You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building multi-platform Dockerfiles, the architecture recorded in the image manifest matches the platform specified via the CLI (--platform) instead of the actual architecture of the image.
Reproduction Steps
Consider the following (simplified) Dockerfile:
FROM --platform=${BUILDPLATFORM} ubuntu:jammy AS my-image
# This line prints 'ARCH=x86_64'RUN echo "ARCH=$(uname -i)"
And build the image with:
# On an amd64 system
docker buildx build --platform linux/arm64 . -t my-image
The resulting image manifest has Architecture=arm64, but running uname -i (or checking the ELF headers of any binary) inside the container shows that the actual architecture is amd64. While this is a minor issue on system with QEMU configured (the correct executor is called), it can lead to execution format errors when running the images on other systems.
Expected Behavior
The manifest should reflect the actual architecture of the image (amd64 in this example), not the platform specified in the CLI.
The text was updated successfully, but these errors were encountered:
When building multi-platform Dockerfiles, the architecture recorded in the image manifest matches the platform specified via the CLI (
--platform
) instead of the actual architecture of the image.Reproduction Steps
Consider the following (simplified) Dockerfile:
And build the image with:
Observed Behavior
Inspecting the image yields the following:
The resulting image manifest has
Architecture=arm64
, but runninguname -i
(or checking the ELF headers of any binary) inside the container shows that the actual architecture isamd64
. While this is a minor issue on system with QEMU configured (the correct executor is called), it can lead to execution format errors when running the images on other systems.Expected Behavior
The manifest should reflect the actual architecture of the image (
amd64
in this example), not the platform specified in the CLI.The text was updated successfully, but these errors were encountered: