Merge pull request #971 from tcely/patch-2
Some checks failed
CI / info (push) Has been cancelled
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / test (3.8) (push) Has been cancelled
CI / test (3.9) (push) Has been cancelled
CI / containerise (push) Has been cancelled

Add /etc/apt/apt.conf.d/docker-disable-pkgcache
This commit is contained in:
meeb 2025-04-18 14:54:35 +10:00 committed by GitHub
commit 98c031ed5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 8 deletions

View File

@ -7,10 +7,11 @@ on:
workflow_dispatch:
push:
branches:
- main
- 'main'
- 'test-*'
pull_request:
branches:
- main
- 'main'
types:
- opened
- reopened
@ -135,14 +136,15 @@ jobs:
push: false
tags: ghcr.io/${{ needs.info.outputs.lowercase-github-actor }}/${{ env.IMAGE_NAME }}:dive
- name: Analysis with `dive`
continue-on-error: false
run: |
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
'ghcr.io/wagoodman/dive' \
'ghcr.io/${{ needs.info.outputs.lowercase-github-actor }}/${{ env.IMAGE_NAME }}:dive' \
--ci \
--highestUserWastedPercent '0.03' \
--highestWastedBytes '10M'
--highestUserWastedPercent '0.05' \
--highestWastedBytes '50M'
- name: Build and push
id: build-push
timeout-minutes: 60

View File

@ -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
@ -215,21 +221,22 @@ RUN set -eu ; \
case "${arg1}" in \
(amd64) printf -- 'x86_64' ;; \
(arm64) printf -- 'aarch64' ;; \
(armv7l) printf -- 'arm' ;; \
(arm|armv7l) printf -- 'armhf' ;; \
(*) printf -- '%s' "${arg1}" ;; \
esac ; \
unset -v arg1 ; \
} ; \
\
file_ext="${CHECKSUM_ALGORITHM}" ; \
apk --no-cache --no-progress add "cmd:${CHECKSUM_ALGORITHM}sum" ; \
mkdir -v /verified ; \
cd /downloaded ; \
for f in *.sha256 ; \
for f in *."${file_ext}" ; \
do \
"${CHECKSUM_ALGORITHM}sum" --check --warn --strict "${f}" || exit ; \
ln -v "${f%.sha256}" /verified/ || exit ; \
ln -v "${f%.${file_ext}}" /verified/ || exit ; \
done ; \
unset -v f ; \
unset -v f file_ext ; \
\
S6_ARCH="$(decide_arch "${TARGETARCH}")" ; \
set -x ; \