Repository navigation
Build db_server for linux/amd64 and linux/arm64 - #3934
Closed
priyawadhwa wants to merge 1 commit into
Closed
priyawadhwa wants to merge 1 commit into
priyawadhwa wants to merge 1 commit into
Conversation
The db_server Dockerfile is a thin repack of the multi-arch mysql:8.4 base (two COPYs and a chmod), but the kaniko step only builds the Cloud Build host platform, so every published gcr.io tag is amd64-only. That leaves arm64 consumers of the sigstore/helm-charts trillian chart unable to run the log storage at all. Switch just this image to a buildx multi-platform build using Cloud Build's documented recipe: install binfmt handlers, create a docker-container builder, and build/push both platforms in one step. The QEMU emulation only covers the chmod layer; the Go images are untouched. The kaniko registry cache flags are dropped for this step since the build is two COPY layers on a pulled base.
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.
We deploy trillian on arm64 Kubernetes nodes through the sigstore/helm-charts trillian chart, which pins
gcr.io/trillian-opensource-ci/db_server. Every published tag of that image (checked through v1.8.0) is a single-manifest amd64 image, so the MySQL pod cannot run on arm64 hosts and the whole log stack is held to amd64. Downstream we worked around it by overriding the chart's image (chainguard-dev/mono#62571), but the image itself is the right place to fix this.The Dockerfile is already multi-arch-ready: it is a thin repack of the multi-arch
mysql:8.4base, two COPYs and a chmod. The amd64-only output comes from the build, since kaniko builds only the Cloud Build host platform. This switches just the db_server step to Cloud Build's documented multi-platform recipe: install binfmt handlers, create adocker-containerbuildx builder, and build/pushlinux/amd64,linux/arm64in one step. QEMU emulation only covers the chmod layer; the Go-binary images are untouched. The kaniko registry cache flags are dropped for this one step, since the build is two COPY layers on a pulled base.