fix: pin golang:1.26.2 to multi-arch index digest (arm64 exec format error on :master)#1131
Merged
psbrar99 merged 1 commit intoenvoyproxy:mainfrom May 7, 2026
Conversation
PR envoyproxy#1124 updated the golang base image from 1.26.1 to 1.26.2, but the new digest sha256:7095ad02810845fa35d1fb090b8e57dd20dce4ca36b29b42951 802350d2ec90e is a single-arch (linux/amd64) image manifest rather than a multi-arch index. The previous 1.26.1 digest sha256:e2ddb153f7 86ee6210bf8c40f7f35490b3ff7d38be70d1a0d358ba64225f6428 is an OCI image index covering linux/amd64, arm64/v8, arm/v7, 386, ppc64le, riscv64, s390x and windows/amd64. When buildx is asked to produce a non-amd64 variant of the published envoyproxy/ratelimit image, the FROM line resolves to the amd64 base on every platform, so the resulting binary is amd64 regardless of the target. The multi-arch publish then stamps that amd64 binary into the arm64 layer of the released index, producing an image that fails on arm64 nodes with: exec /bin/ratelimit: exec format error Swap to the corresponding multi-arch index digest sha256:b54cbf583d39 0341599d7bcbc062425c081105cc5ef6d170ced98ef9d047c716, which contains the existing 7095ad02... amd64 manifest as one of its children plus the arm64/v8 and other platform variants. The amd64 image is unchanged; arm64 builds now produce arm64 binaries. Signed-off-by: Harrison Harris <harrison.harris@xapien.com>
765b5f3 to
7e788b0
Compare
Contributor
Author
|
@envoyproxy/ratelimit-maintainers Could you please review? As a first-time contributor the workflows are gated on your approval however I've opened the same PR on my fork and all three jobs ( You may also wish to consider deleting the I'm not familiar with contributing to public repos so please let me know if I'm missing anything, thanks! |
|
CC @collin-lee |
zirain
approved these changes
May 7, 2026
psbrar99
approved these changes
May 7, 2026
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
Pin the
golang:1.26.2base image inDockerfile,Dockerfile.integration, andexamples/xds-sotw-config-server/Dockerfileto the multi-arch OCI image index digestsha256:b54cbf583d390341599d7bcbc062425c081105cc5ef6d170ced98ef9d047c716, replacing the single-arch (linux/amd64) image manifest digestsha256:7095ad02810845fa35d1fb090b8e57dd20dce4ca36b29b42951802350d2ec90eintroduced in #1124.golang:1.26.1(pre-#1124)e2ddb153…golang:1.26.2(currentmaster, broken on arm64)7095ad02…golang:1.26.2(this PR)b54cbf58…7095ad02…amd64 child)Problem
Since #1124 merged on 2026-04-30, every
envoyproxy/ratelimit:masterimage published to Docker Hub contains the linux/amd64 binary inside the linux/arm64/v8 layer. On arm64 hosts the container fails immediately at startup:The arm64 layer in the published index is byte-identical to the amd64 layer at 9192208 bytes, vs the previous good build's separate 9151374 / 8398114 byte layers.
Root cause
The previous 1.26.1 pin used the multi-arch OCI image index digest
sha256:e2ddb153f786...(mediaType: application/vnd.oci.image.index.v1+json), which fans out per-platform when buildx is asked for arm64.The 1.26.2 pin introduced in #1124 (
sha256:7095ad02...) is instead a single-arch image manifest (mediaType: application/vnd.oci.image.manifest.v1+json, config:os: linux, architecture: amd64) — there is no arm64 child to resolve to.When buildx builds the arm64 variant, it pulls this amd64 base anyway, the Go compile targets amd64 regardless of the requested platform, and the published multi-arch manifest stamps that amd64 binary into the arm64 layer.
This is a known Docker UX footgun:
docker pull <tag>on an amd64 host exposes the per-arch image digest inRepoDigests, not the index digest. Copy-pasting from there silently strips multi-arch support — the build only fails on non-amd64 targets, and amd64 CI runners stay green.Fix
Use the corresponding multi-arch index digest for the same
golang:1.26.2tag. The new digest containssha256:7095ad02...as itslinux/amd64child pluslinux/arm64/v8(sha256:9cad238cf0e0...) and the other platforms the 1.26.1 index covered. The amd64 image is byte-identical; only the broken arm64 path changes — from "silently produces an amd64 binary" to "produces an arm64 binary".Verification
Risk
Low — amd64 image unchanged, arm64 path changes from broken-and-silent to working. No code changes; only
FROMdigest swap in three Dockerfiles.