Docker Nginx Container

Facts in short:
– Written in Go (from Google)
– Entirely controlled by a REST API
– Running on Linux, Windows and MacOS
plus in many Public/Privat Clouds like
AWS, Google Cloud Platform, Microsoft Azure, etc.
– runtime for containers are based on Open Source


Containers include the application and all of its dependencies, but share the kernel with other containers, running as isolated processes in user space on the host operating system.

Docker containers are not tied to any specific infrastructure; they run on any computer, on any infrastructure, and in any cloud.

Linux is built in such a way, that you can directly create separate user spaces.

Each user space is in a separate isolated “sandbox” area. Each user space has its own file system and processes. These user spaces are all segregated and separate from each other.

Containers leverage this technology of the Linux operating system.

A container is just like a virtual machine WITHOUT THE OPERATING SYSTEM.


Containers use the Linux OS of the physical machine.

To the user, each container appears just like a real machine.

Here is an image from docker’s website that shows a comparison between virtual machines and containers:


1. Dockerfile:
# An other example can be downloaded from: \
FROM ubuntu:14.04
RUN apt-get update && apt-get install -y curl openssl nginx
EXPOSE 80 443
CMD [ “nginx”, “-g”, “daemon off;” ]

2. Build an image with the repos and name it “nginx:14.04”:
docker build -f ./Dockerfile –no-cache -t nginx:14.04 .

3. Generate and run this image “nginx:14.04” in container “c001”:
docker run −−name c001 -m 32M -p 8080:80 -d nginx:14.04

4. Go to this container with name “c001”:
bash -c “clear && docker exec -it c001 sh”