How to use docker pull to pull container images of specific architecture amd64, arm64, aarch64
About x86, x86_64, x64, amd64 and arm64, aarch64
open properties
By modifying the dockerd configuration file and reloading, you can enable the experimental properties of dockerd on the server. For the configuration file /etc/docker/daemon.json
Add "experimental": true.
The modified configuration file will look similar to the following:
{
"experimental": true
}
After the modification is complete, reset the service with the following command:
systemctl daemon-reload
systemctl restart docker
Pull the image of the specified architecture
Specify the parameters when docker pull to complete the pulling of the specified architecture image. Take pulling the alpine image of the arm64 architecture as an example.
docker pull --platform linux/arm64 openjdk
Its schema information can be determined by the following command:
$ docker image inspect openjdk | grep Architecture
"Architecture": "arm64",
The architecture of the host is aarch64:
$ arch
aarch64