From 2c39a17e69a6989cd534d30b89fd52d2a21bd05e Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Mon, 28 Sep 2026 22:42:23 +1000 Subject: [PATCH] docker: alias the default tags instead of rebuilding them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The unsuffixed : and :latest came from a second, independent buildx step, so they resolved to a different digest than :- — nobody had tested the bits consumers pin. Published v0.1.0 shows it: the amd64 children share four layers and differ in the top one. Retag the manifest the matrix step just pushed with imagetools create. Drop the duplicate build. --- .woodpecker/docker.yaml | 32 ++++++++++++++++---------------- README.md | 3 ++- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.woodpecker/docker.yaml b/.woodpecker/docker.yaml index 12b4a86..463f4b4 100644 --- a/.woodpecker/docker.yaml +++ b/.woodpecker/docker.yaml @@ -36,28 +36,28 @@ steps: memory: 4Gi cpu: 2 - # The default distro also carries the unsuffixed tags. - - name: docker-default + # The default distro's unsuffixed tags are aliases of the image the step above just + # pushed, not a second build of it: imagetools create only writes new tag references + # to the existing manifest, so :, :latest and :- are one + # digest. No daemon is involved; the internal CA is baked into this image at + # /etc/docker/certs.d/. + - name: docker-default-tags image: "artifactapi.k8s.syd1.au.unkin.net/docker-internal/plugin-docker-buildx:latest" when: - evaluate: 'DEFAULT == "true"' - settings: - registry: artifactapi.k8s.syd1.au.unkin.net - repo: "artifactapi.k8s.syd1.au.unkin.net/docker-internal/gobuilder" - target: image - build_args: - BASE_IMAGE_NAME: "${BASE_IMAGE_NAME}" - DISTRO: "${DISTRO}" - tags: - - "${CI_COMMIT_TAG##v}" - - latest + environment: + REPO: "artifactapi.k8s.syd1.au.unkin.net/docker-internal/gobuilder" + VERSION: "${CI_COMMIT_TAG##v}" + SUFFIX: "${TAG_SUFFIX}" + commands: + - 'docker buildx imagetools create -t "$REPO:$VERSION" -t "$REPO:latest" "$REPO:$VERSION-$SUFFIX"' backend_options: kubernetes: serviceAccountName: default resources: requests: - memory: 1Gi - cpu: 1 + memory: 256Mi + cpu: 250m limits: - memory: 4Gi - cpu: 2 + memory: 512Mi + cpu: 500m diff --git a/README.md b/README.md index 1f0aaee..62355e6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ The estate's Go toolchain image, built on each `container-base` distro image. Published as `artifactapi.k8s.syd1.au.unkin.net/docker-internal/gobuilder:-`; -the default distro also gets the unsuffixed `:` and `:latest`. +the default distro's build is retagged as the unsuffixed `:` and `:latest`, +so all three resolve to one digest. | distro | from | tag suffix | default | | --- | --- | --- | --- |