Overview of Docker containers
Docker is an open source initiative for OS virtualization that automates the deployment of applications inside software containers. It provides isolated user spaces and hence provides user-based processes, space, and filesystems. Behind the scenes, it shares the Linux host kernel. The following diagram illustrates the working mechanism of a Docker container:
Docker has two main components, with a client-server architecture:
The Docker host
: The Docker host contains the Docker daemon, containers, and images. The Docker engine is an important component that provides the core Docker technology. This core Docker technology enables images and containers. When we install Docker successfully, we run a simple command. In our case, we will consider CentOS for the container. To run an interactive shell in the CentOS image, usedocker run -i -t <image> /bin/bash
:The
-i
flag initiates an interactive containerThe
-t
flag creates a pseudo-terminal that attachesstdin...