docker 镜像中的默认平台类型是什么?
dockerFile命令FROM中从docker hub加载镜像时,如果没有指定平台,是根据当前服务器架构加载的吗?
我的意思是,当我在 amazon linux 2 x86 上构建 dockerfile 时,docker 引擎是否获得可以在 linux/x86-64 上运行的 docker 映像? 谢谢你!!
When loading an image from a docker hub in dockerFile command FROM, if the platform is not specified, is it loaded based on the current server architecture?
I mean, when I build dockerfile on amazon linux 2 x86, is docker engine get docker image which can running on linux/x86-64?
Thank you!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Docker构建默认设置以使用您正在构建的目标平台的平台提取基本图像。该目标平台默认为Docker主机的平台。因此,如果您的Docker引擎在Linux/AMD64上运行,并且您不通过
- 平台
到docker build
或 from line,它将尝试从多平台基础图像中汲取Linux/AMD64图像。您可以通过运行:
The docker build defaults to pulling base images with the platform of the target platform you are building. And that target platform defaults to the platform of your docker host. So if your docker engine is running on linux/amd64, and you do not pass
--platform
to eitherdocker build
or theFROM
line, it will attempt to pull linux/amd64 images from a multi platform base image.You can check your docker host by running: