New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
containerd: classic builder fails to preserve platform information correctly #47823
Labels
containerd-integration
Issues and PRs related to containerd integration
kind/bug
Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
status/0-triage
Comments
tianon
added
status/0-triage
kind/bug
Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
labels
May 10, 2024
Just because I'm feeling paranoid and wanted to be absolutely certain this is scoped specifically to the containerd snapshotter integration, I ran it again with the non-containerd configuration and it works correctly and as expected: $ docker run -it --rm --name dind --privileged --pull=always tianon/docker-master dockerd
... $ docker exec -i -e DOCKER_BUILDKIT=0 dind docker build --pull --platform linux/arm64 - <<<$'FROM bash\nRUN apk --print-arch'
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
BuildKit is currently disabled; enable it by removing the DOCKER_BUILDKIT=0
environment-variable.
Sending build context to Docker daemon 2.048kB
Step 1/2 : FROM bash
latest: Pulling from library/bash
bca4290a9639: Pulling fs layer
3f7f1892fc44: Pulling fs layer
a08a5a04fd53: Pulling fs layer
a08a5a04fd53: Download complete
bca4290a9639: Verifying Checksum
bca4290a9639: Download complete
3f7f1892fc44: Verifying Checksum
3f7f1892fc44: Download complete
bca4290a9639: Pull complete
3f7f1892fc44: Pull complete
a08a5a04fd53: Pull complete
Digest: sha256:890897682a8025c1e178b5ec6126b3b532ad8535f1e81dbf60bc2b7300b1bcf8
Status: Downloaded newer image for bash:latest
---> 2b0b7c7c3e41
Step 2/2 : RUN apk --print-arch
---> [Warning] The requested image's platform (linux/arm64) does not match the detected host platform (linux/amd64/v3) and no specific platform was requested
---> Running in 5165e07f1493
aarch64
---> Removed intermediate container 5165e07f1493
---> d9ba09cc96db
Successfully built d9ba09cc96db |
rumpl
added
the
containerd-integration
Issues and PRs related to containerd integration
label
May 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
containerd-integration
Issues and PRs related to containerd integration
kind/bug
Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
status/0-triage
Description
While using the classic builder with the containerd snapshotter integration enabled,
DOCKER_BUILDKIT=0 docker build --platform something-non-native ...
fails, and the error message is referencing the native platform of the selected base image (which if it exists, is used and the wrong platform is used for the build 😬).Reproduce
(the image I was testing here was built via https://github.com/tianon/dockerfiles/blob/fc8d0a8d84b3a8c90685181af21014077902cbb3/docker-master/Dockerfile + https://github.com/tianon/dockerfiles/blob/fc8d0a8d84b3a8c90685181af21014077902cbb3/docker-master/Dockerfile.containerd -> https://oci.dag.dev/?image=tianon/docker-master:containerd@sha256:0b27437d09e78b950c740966b00560ea7012a1261a6e90029030f68e328a9409)
Expected behavior
That
RUN
should printaarch64
.If I first
docker pull bash
(to get my local-archamd64
image), it'll erroneously printx86_64
, which IMO is actually even worse than erroring out because that's generating an incorrect build. 😭docker version
docker info
Additional Info
No response
The text was updated successfully, but these errors were encountered: