Answer the question
In order to leave comments, you need to log in
Should docker base images (OS) be the same?
Let's say I work on Windows, on top of which is a virtual machine with alpine linux (this distro is installed by the official docker for windows installer). I want to install nginx from. image, which is also based on alpine (FROM alpine:3.5), everything is OK. But then I will want to use another image that is already based on debian. It's not entirely clear here ... The kernel will be used from the alpine linux that I have on the virtual machine over Windows, but what about the difference in distributions?
It turns out that everything that is missing will get into that container, all the giblets from debian, so it turns out? Is this the normal way? Or do you need to build your image also already on alpine, if the image developer did not provide such an option? Is there a difference in size and resources, and is it necessary to bother or use all images based on any distributions, even on ubuntu?
Also, does it matter what linux is on the docker host? Let's say I have a server with centos7, and I want to run all containers on it, how does this change the situation?
Answer the question
In order to leave comments, you need to log in
If you make "your image is also already on alpine", it will use the alpine image that is already in the system.
If debian then download debian and use it. Accordingly, it will take up disk space, 200MB somewhere.
Of course, it is better to inherit your images from one, modified. It's just less space and it's more familiar to deal with the container. But it's often easier to take a ready-made one from library.
Linux on the host does not matter, this is why the docker is installed so that it does not depend on the host system.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question