Welcome to the Docker Tutorial Series. This series of tutorials will help beginners to have enough knowledge about Docker. The Part 1 of this series, will take you through the difference between a Containers and Virtual Machines, we will explore what is Docker and his Components.
Containers vs. Virtual Machines
A container runs natively on Linux and shares the kernel of the host machine with other containers. It runs a discrete process, taking no more memory than any other executable, making it lightweight.
By contrast, a virtual machine (VM) runs a full-blown guest operating system with virtual access to host resources through a hypervisor. In general, VMs provide an environment with more resources than most applications need.
What is Docker ?
Docker is a containerization platform which packages your application and all it’s dependencies together in the form of containers so as to ensure that your application works seamlessly in any environment be it development or test or production.
Docker Architecture
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers.
Although, the Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. Last but not least, the Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface.
The Docker daemon
The Docker daemon dockerd
listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.
The Docker client
The Docker client is the primary way that many Docker users interact with Docker. When you use commands such as docker run
, the client sends these commands to dockerd
, which carries them out. The docker command uses the Docker API. Although, the Docker client can communicate with more than one daemon.
The Docker images
Docker images are the source of Docker Container. However, Docker Images are used to create containers, are created from Docker file using Build
command.
Moreove, the Docker images are stored in a Docker registry such as registry.hub.docker.com
because they can become quite large.
The Docker Containers
Docker Containers are basically run-time instances of Docker Images, they include the applications and all it’s dependencies, but share the kernel with other containers ( Host Kernel ).
In addition, the Docker Containers are running as isolated processes in user space on the host operating system. Also are not tied to any specific infrastructure: they can run on any computer, on any infrastructure.
The Docker Registry
A Docker Registry stores Docker images. You can think of the registry as a directory of all available Docker images.
Furthermore, Docker Hub is the public Docker registry that anyone can use, and Docker is configured to look for images on Docker Hub by default. You can even run your own private registry for pulling and pulling images.
Conclusion
Docker right now is the best way to have an portable application that can be work on any machine, any Operating System and any infrastructure. So, you do not have to waste your time and effort thinking about the machines and the infrastructures and operating system. The Docker can be a great part of your automation life Cycle, from one file and one command your application and it’s dependencies will be up running, It will not take time for starting up. Next step will be how to install docker CE on Linux System.