If I wish to create a Go binary in a Docker image to be run as a container on a Raspberry Pi 4 (whose architecture is 32-bit ARM AFAIK), which base image is recommended to be used?
In fact will there be any difference, or will Docker be clever enough to know that the first should really be the second on a 32-bit ARM architecture?
(I know the second choice works, and I think the first also does.)
These images are the same. You can check hash of each image and see that they are equal: 6ab6b95325d8
( golang:latest , arm32v7/golang:latest ). I will prefer to use generic golang:latest
, because it will allow to build new image on different platform without changes to Dockerfile
.
Note from arm32v7/golang:latest
:
this is the "per-architecture" repository for the arm32v7 builds of the golang official image
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.