Skip to content

Push slim image by digest via regctl#32

Merged
richturner merged 1 commit intomainfrom
fix/slim-push-via-regctl
May 7, 2026
Merged

Push slim image by digest via regctl#32
richturner merged 1 commit intomainfrom
fix/slim-push-via-regctl

Conversation

@Miggets7
Copy link
Copy Markdown
Contributor

@Miggets7 Miggets7 commented May 7, 2026

Summary

  • Replace the buildx-passthrough slim push (which can't push docker-daemon images by digest) with a docker saveregctl image importregctl image copy <repo>@<digest> flow, so the slim image still lands in the registry without ever creating a per-arch tag.
  • regctl is installed via the upstream regclient/actions/regctl-installer action, pinned to v0.11.3. sigstore/cosign-installer runs first so the action's opportunistic cosign verify-blob against the regclient sigstore signature actually fires (the action silently skips verification if cosign isn't on PATH).
  • Push step hardening: retry regctl image copy 3× with backoff on transient registry errors, assert that regctl registry login persisted the credential before staging the tar, and trap the tar + OCI layout cleanup so a mid-step failure doesn't leave hundreds of MB on the runner for a re-run to ENOSPC on.
  • Delete Dockerfile.passthrough. Its only purpose was the buildx workaround; nothing else in the repo references it.

PR CI doesn't exercise the slim push (gated on non-PR events); first real run is post-merge on main. Rollback is a single-commit revert of the merge commit.

Replace the buildx-passthrough push (which can't push docker-daemon
images by digest) with `docker save` -> `regctl image import` ->
`regctl image copy` to a digest URL, leaving no per-arch tag in the
registry.

regctl is installed via the upstream `regclient/actions/regctl-installer`
action, with `sigstore/cosign-installer` first so the binary's sigstore
signature is verified. The push step retries transiently failing
copies, asserts the registry credential persisted post-login, and
cleans up the staged tar/OCI layout via `trap`.

`Dockerfile.passthrough` existed only as the buildx workaround and is
removed.
@Miggets7 Miggets7 requested a review from richturner May 7, 2026 08:57
@richturner richturner merged commit 26af47d into main May 7, 2026
3 checks passed
@richturner richturner deleted the fix/slim-push-via-regctl branch May 7, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants