I have a question about the architecture of docker images.
For example, alpine:latest
provides the image for linux/arm/v8
architecture.
We can pull this image by specifying the linux/arm64
platform:
$ docker pull --platform linux/arm64 alpine
$ docker image inspect alpine
...
"Architecture": "arm64",
"Variant": "v8",
"Os": "linux",
...
I figured out that this result implies linux/arm64
is an alias for linux/arm64/v8
.
In another experiments, I found the following similar behaviors:
--platform linux/arm/v8
pullslinux/arm64
image--platform linux/arm
pullslinux/arm/v7
image--platform linux/arm/v7
pullslinux/arm
image
Could you please explain the definition of such aliases, or the rules for resolving the architecture? Or is there an official guide?
Thanks.
2
Answers
The Docker documentation has this list:
I got my own answer to this topic, so let me share it.
docker buildx build
command, we can find the following statement:That’s almost all I needed.
Appendix
linux/arm64/v8
will be normalized aslinux/arm64
.arm
architecture isv7
.