Skip to content

release: fix multi-arch Docker builds (manifest list export error)#828

Merged
javuto merged 1 commit into
jmpsec:mainfrom
alvarofraguas:pr/goreleaser-multi-arch-manifest
May 19, 2026
Merged

release: fix multi-arch Docker builds (manifest list export error)#828
javuto merged 1 commit into
jmpsec:mainfrom
alvarofraguas:pr/goreleaser-multi-arch-manifest

Conversation

@alvarofraguas
Copy link
Copy Markdown
Collaborator

Summary

  • Every tagged release since v0.4.8 fails at the Docker step with:

    docker exporter does not currently support exporting manifest lists
    

    The root cause is that a single buildx invocation with --platform=linux/amd64,linux/arm64 tries to export a manifest list, which the default Docker exporter does not support.

  • Fix: split each component's dockers: block into two per-arch entries (e.g. osctrl-tls:<version>-amd64 and osctrl-tls:<version>-arm64), then combine them via docker_manifests: into the final multi-arch tags (<version> and latest). docker pull <image>:<tag> now resolves the correct arch automatically.

  • skip_push on manifest entries is gated by {{ .IsSnapshot }} so snapshot builds still work without pushing.

Changes

  • .goreleaser.yml: 4 multi-platform docker blocks → 8 per-arch blocks + 8 docker_manifests entries

Test plan

  • goreleaser check validates the config
  • Tag a pre-release and verify Docker images are pushed with correct multi-arch manifests

…i-arch tags

The default Docker exporter does not support exporting manifest lists
from a single multi-platform buildx invocation.  Every tagged release
since v0.4.8 failed at the docker step with:

    docker exporter does not currently support exporting manifest lists

Fix: build each component as two separate per-arch images
(e.g. osctrl-tls:<version>-amd64, osctrl-tls:<version>-arm64) and
combine them into multi-arch manifest lists via the docker_manifests
section.  `docker pull <image>:<tag>` now resolves to the correct
architecture automatically.

skip_push on docker_manifests is gated by IsSnapshot so snapshot
builds still work without pushing.
@javuto javuto added 📦 build Building related issues 🚧 bugfix Fix for an existing bug cicd CICD related issues labels May 19, 2026
Copy link
Copy Markdown
Collaborator

@javuto javuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@javuto javuto merged commit 78e362b into jmpsec:main May 19, 2026
2 checks passed
@alvarofraguas
Copy link
Copy Markdown
Collaborator Author

The main CI run triggered by this merge (26082810103) got past the manifest-list error but hit a second bug: the arm64 docker builds fail with "/osctrl-admin-linux-amd64": not found.

Root cause: The Dockerfiles declare ARG GOARCH=amd64 as default, and the arm64 goreleaser blocks pass --platform=linux/arm64 but never override GOARCH. So the COPY instruction looks for the amd64 binary in an arm64 build context.

Fix in #839 — adds --build-arg=GOARCH=arm64 to all four arm64 docker blocks.

javuto pushed a commit that referenced this pull request May 19, 2026
The Dockerfiles use ARG GOARCH=amd64 as default. The arm64 goreleaser
blocks set --platform=linux/arm64 but never override the GOARCH arg,
so the COPY instruction looks for the amd64 binary in an arm64 build
context and fails with "not found".

Fixes the CI failure surfaced after #828 landed — the manifest-list
fix let the build proceed far enough to hit this second bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚧 bugfix Fix for an existing bug 📦 build Building related issues cicd CICD related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants