From 624406eb27f0114753c0b52fb1487b332dc14f1d Mon Sep 17 00:00:00 2001 From: tcely Date: Thu, 17 Apr 2025 14:41:21 -0400 Subject: [PATCH] Add /etc/apt/apt.conf.d/docker-disable-pkgcache --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index d3169884..5af1acab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,7 @@ FROM debian:${DEBIAN_VERSION} AS tubesync-base ARG TARGETARCH ENV DEBIAN_FRONTEND="noninteractive" \ + APT_KEEP_ARCHIVES=1 \ HOME="/root" \ LANGUAGE="en_US.UTF-8" \ LANG="en_US.UTF-8" \ @@ -39,6 +40,11 @@ RUN --mount=type=cache,id=apt-lib-cache-${TARGETARCH},sharing=private,target=/va rm -f /var/cache/apt/*cache.bin ; \ # Update from the network and keep cache rm -f /etc/apt/apt.conf.d/docker-clean ; \ + # Do not generate more /var/cache/apt/*cache.bin files + # hopefully soon, this will be included in Debian images + printf -- >| /etc/apt/apt.conf.d/docker-disable-pkgcache \ + 'Dir::Cache::%spkgcache "";\n' '' src ; \ + chmod a+r /etc/apt/apt.conf.d/docker-disable-pkgcache ; \ set -x && \ apt-get update && \ # Install locales