Arch in dockerfile#503
Conversation
Dockerfile
Outdated
| ARG DOCKER_VERSION=28.0.1 | ||
| ARG DOCKER_CHANNEL=stable | ||
| # also tested with aarch64 | ||
| ARG ARCH=x86_64 |
There was a problem hiding this comment.
This should use TARGETARCH to support docker build --platform
https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/
There was a problem hiding this comment.
Or maybe just checking $(uname -m) may suffice, then no need to use ARG
There was a problem hiding this comment.
According to https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/ all variables such as TARGETARCH, TARGETPLATFORM from --platform are filled with arm64,
it's strange but all url, like https://download.docker.com/linux/static/stable/linux/aarch64/docker-27.5.0.tgz contain aarch64, not arm64.
I think $(uname -m) is enough, to not spread variables.
45a36b7 to
6c7aea1
Compare
|
Please squash the commits |
To run it in Ubuntu VM on MAC Mx, taishan/kunpeng, thunder x servers. Signed-off-by: Alexey Perevalov <alexperevalov@yandex-team.ru>
6c7aea1 to
968358d
Compare
This PR adds parameter into Dockerfile for ISA of binaries used during image build.
The default value is x86_64 as before.
This PR tested with aarch64, and it could be specified by
--build-arg ARCH=aarch64options ofdocker buildcommand.