I started to learn how to work with Docker and I had this question.
When I make "docker pull <image-name>" I usually pull the image from docker hub.
But images can have different versions that differ in OS and architecture. For example a python image has versions with linux and windows.
I’m wondering what image I’ll get if I just do a "docker pull python" and how I can choose the OS and architecture myself.
I actually prefer to use linux images because it’s lightweight and I don’t want accidentally pull a windows image.
2
Answers
It’s based on the host platform where docker is running. You can see this in
docker info
:The code for this is in containerd and the OS and Arch are looked up slightly differently in go:
From "Leverage multi-CPU architecture support"
So it depends on the OS used when you do your
docker pull
.The same page adds: