Conversation
Remove `use: buildx` from Docker configuration to fix the --load flag error that occurs with multi-platform builds. Problem: When using buildx with multi-platform builds, GoReleaser tries to use --load flag which is incompatible with multi-platform images. The --load flag only works for single-platform builds loaded into the local Docker daemon. Solution: Remove `use: buildx` and let GoReleaser build each architecture separately using standard Docker build. Each architecture is built individually, then docker_manifests combines them into multi-arch manifests. How it works now: 1. Build linux/amd64 image separately 2. Build linux/arm64 image separately 3. Create docker_manifests to combine both 4. Push multi-arch manifests to registry This avoids the buildx --load conflict while maintaining multi-arch support.
ReviewCorrect fix. Removing GoReleaser builds each arch separately with standard Docker, then combines via manifests (lines 280-299). This is the right approach for multi-arch. One concern: Dockerfile at .goreleaser.yaml:246,264 uses Ship it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove
use: buildxfrom Docker configuration to fix the--loadflag error that occurs with multi-platform builds.Problem
When using buildx with multi-platform builds, GoReleaser tries to use the
--loadflag which is incompatible:The
--loadflag only works for single-platform builds that are loaded into the local Docker daemon. Multi-platform builds must be pushed directly to a registry.Solution
Remove
use: buildxand let GoReleaser build each architecture separately using standard Docker build. Each architecture is built individually, thendocker_manifestscombines them into multi-arch manifests.How It Works Now
linux/amd64image separately with standard Dockerlinux/arm64image separately with standard Dockerdocker_manifeststo combine both into multi-arch imagesResult
Technical Details
use: buildx, GoReleaser uses standarddocker buildfor each architecturegoarchfield ensures the correct Go binary is used in each imagedocker_manifestssection creates the multi-arch manifests after individual buildsFixes #149