Reputation: 4422
I am very new to Docker and confused with some things first of which is
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install -y curl nginx
above statement , does this statement mean we are installing ubuntu OS in a docker container which is already running on a OS e.g DC/OS in my case.
Upvotes: 4
Views: 6533
Reputation: 1305
It seems you have a misunderstanding of the docker concept.
What you are doing is pulling an image with the operating system of Ubuntu 14 and creating an instance of it (a container) that has nginx installed on it.
This does not make your os change it gives you a workspace not unlike a vm to run what you want.
Upvotes: 3
Reputation: 51738
The statment FROM ubuntu:14.04
means use the ubuntu image as a base image.
The ubuntu image is not an OS. This image "mimics" an Ubuntu OS, in the sense that it has a very similar filesystem structure to an Ubuntu os and has many tools available that are typically found on Ubuntu.
The main and fundamental difference is that the Docker Ubuntu image does not have it own linux kernel. It uses the kernel of the host machine where the container is running.
Moreover, the size difference between the Docker image (73MB) and an Ubuntu iso(around 1Gb) is very significant.
Upvotes: 7