ci!: migrate docker config to dockers_v2#10783
Open
nikpivkin wants to merge 1 commit into
Open
Conversation
6 tasks
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.
Description
dockers_v2is production-ready in GoReleaser v2.16.0. It replaces the separatedockers+docker_manifestsblocks with a single entry that usesdocker buildxfor native multi-arch builds.Breaking change (architecture-specific image tags): The old dockers approach published separate per-arch images with name suffixes (e.g. trivy:0.x.y-amd64, trivy:0.x.y-arm64) before merging them into a manifest list via
docker_manifests. Withdockers_v2/docker buildx, the multi-arch manifest is built directly — intermediate per-arch tagged images are no longer pushed. If any consumers pin to an architecture-specific suffix tag, they will need to switch to the plain tag and let the registry resolve the correct arch.Changes
goreleaser.ymldockersentries + 6docker_manifestsentries with a singledockers_v2block withplatforms,images, andannotationsannotationsfield (previously inlabels)DockerfileCOPY ${TARGETPLATFORM}/trivy—dockers_v2places pre-built binaries into platform-specific subdirectories (linux/amd64/,linux/arm64/, etc.)TARGETPLATFORM=.preserves local build supportTesting
Test run: https://github.com/nikpivkin/trivy/actions/runs/26814550463/job/79052883502
docker run --rm ghcr.io/nikpivkin/trivy:0.109.0 version→Version: 0.109.0✓Notes on dockers_v2
dockers_v2is currently a provisional name in GoReleaser v2. It is planned to replace bothdockersanddocker_manifestsas the single canonical block in GoReleaser v3 (no ETA). When this project upgrades to GoReleaser v3, a further migration step will be required (likely a simple rename of the block key). This PR deliberately adoptsdockers_v2now so that the v3 migration is a trivial diff rather than a full rebuild of the config.Related PRs
Checklist