Repository navigation
Conversation
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
Fixes a critical bug in the Containerfile that prevented multi-platform builds from working correctly. The
TARGETARCHARG had a default value (amd64) that was overriding Docker BuildKit's automatic platform detection, causing builds to download incorrect architecture-specific binaries and fail with "Exec format error".Related Issue(s)
Closes #
Type of Change
Changes Made
Containerfile (line 60)
ARG TARGETARCH=amd64ARG TARGETARCHWorkflow (publish-container-image.yml)
ghcr.io/vig-os/devcontainer:VERSION-ARCH)CHANGELOG.md
Root Cause
The default value
=amd64was overriding Docker BuildKit's automatic platform detection. When building for arm64, the build would still useamd64as the value, causing it to download amd64 binaries (GitHub CLI, uv) which would fail to execute on arm64 with "Exec format error".Error Symptoms (Before Fix)
Build Error:
Test Error (after Containerfile fix but before workflow fix):
Podman couldn't find the image with expected tag
ghcr.io/vig-os/devcontainerTesting
just test)Manual Testing Details
Before the fix:
After the fix:
just clean && just build && just testcompletes without errorsVerification commands:
Checklist
[Unreleased]sectionAdditional Notes
Impact
This is a critical fix that enables the multi-platform container image publishing workflow to function correctly. Without this fix:
Technical Details
Docker BuildKit provides several built-in ARGs for multi-platform builds:
TARGETPLATFORM- e.g.,linux/amd64,linux/arm64TARGETOS- e.g.,linuxTARGETARCH- e.g.,amd64,arm64These ARGs are automatically set based on the
--platformflag. By declaringARG TARGETARCHwithout a default value, we allow BuildKit to inject the correct value for each platform being built.