From 624406eb27f0114753c0b52fb1487b332dc14f1d Mon Sep 17 00:00:00 2001 From: tcely Date: Thu, 17 Apr 2025 14:41:21 -0400 Subject: [PATCH 1/5] 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 From a6fea907200a0e408991be4b556a2635569463f7 Mon Sep 17 00:00:00 2001 From: tcely Date: Thu, 17 Apr 2025 15:28:20 -0400 Subject: [PATCH 2/5] Remove a raw value For now, `file_ext` has the same value as, `CHECKSUM_ALGORITHM`, but I used another variable to make changing it easier. --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5af1acab..3cbeda4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -227,15 +227,16 @@ RUN set -eu ; \ 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 ; \ From 8fe43170a4d2691ae40612391463a7adfefffc87 Mon Sep 17 00:00:00 2001 From: tcely Date: Thu, 17 Apr 2025 15:32:14 -0400 Subject: [PATCH 3/5] Debian on `arm` is `armhf` Not that we are likely to use this, but I figured this out, and it costs nothing to leave a case here. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3cbeda4c..d68efe3e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -221,7 +221,7 @@ 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 ; \ From 083e29a1891b640c299e06da1fe2b196913458da Mon Sep 17 00:00:00 2001 From: tcely Date: Thu, 17 Apr 2025 15:37:55 -0400 Subject: [PATCH 4/5] Save a step for test branches --- .github/workflows/ci.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c5c46c5b..6204097a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,10 +7,11 @@ on: workflow_dispatch: push: branches: - - main + - 'main' + - 'test-*' pull_request: branches: - - main + - 'main' types: - opened - reopened From 970e8c9a603a3afd04f88c0566e16fab6d9d5a5d Mon Sep 17 00:00:00 2001 From: tcely Date: Thu, 17 Apr 2025 15:43:36 -0400 Subject: [PATCH 5/5] Adjustments for the `perl-base` upgrade --- .github/workflows/ci.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6204097a..9edc7225 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -136,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