I am new to the Docker world. I want to ask my question by giving an example. Say there is a company that is using a windows OS on their servers. To run a Docker container, they need to have a Linux environment right. Hence, they make use of virtualization technology to create a virtual machine with a Linux environment to run this container. Here, this Linux OS is already acting as a guest OS then why do we need to have/install alpine or Ubuntu as the base image in the docker file? Could you please correct me if my understanding is wrong. Thank you.
All processes in the Docker Container
are isolated.
So By design your Host programs are not available inside the Docker image.
Technically, you do not need Alpine
or Ubuntu
Linux base image. For example you can use the Scratch
image: https://hub.docker.com/_/scratch
Idea of the docker is to provide fully isolated exactly the same environment for application, they do not force to use any base image.
However it's good to use official base image because:
Docker uses layer design, to minimize size of images. More info here: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With