Home > Net >  What is default platform type in docker image?
What is default platform type in docker image?

Time:04-07

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!!

CodePudding user response:

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 either docker build or the FROM line, it will attempt to pull linux/amd64 images from a multi platform base image.

  • Related