Docker Community Forums

Share and learn in the Docker community.

Role of Base OS in Docker file - if the image is deployed with "Process" Isolation

Hi,
I understand that if we deploy an image with isolation as process, then the container would be using the base OS.

Consider a scenario where I am creating an image which will be used only by me. Also I wll be deploying the image only with Isolation as Process (which obviously means my image will be using the host OS). 

In this scenario to create the image, do I need to mention the base OS in my Docker file. what role/impact does the base OS mentioned in the docker file has. kindly explain.

Thanks,

It depends how you define “host OS”. If you restrict this to the host kernel, and all the network and storage magic docker uses to permit a container to have network and storage functionality, then your statement is true. If you define “host OS” beyond this point, then the answer is: not realy.

Thanks Meyay… But I am unable to understand your statement - “If you restrict this to the host kernel,…”. How do I restrict it. can you please explain…

Thanks,

Uhm, the restriction applies to the stateament you made regarding “the host os” - as in it depends what you personaly define as “host os” in this context. Depending on that definition, your understanding is either correct or wrong…