In simple words, we can say that Docker is an open platform where a user can run, develop, deploy, share, and may more quickly and easily use the docker-provided functionality.
Docker Architecture
The Docker architecture uses a client-server model and comprises the Docker Client, Docker Host, Network and Storage components, and the Docker Hub.
Docker client
The Docker client provides an interface by which users interact with Docker. The Docker client can reside on the same host system as the daemon or connect to a daemon on a remote host system. A docker client can communicate with more than one daemon. The Docker client provides a command-line interface (CLI) that allows you to build, run, and stop application commands to a Docker daemon.
The main purpose of the Docker Client is to provide a medium to directly pull images from registries and to have them run on a Docker host.
Docker host
The Docker host provides a complete environment to execute and run applications and projects. The daemon is responsible for all container-related actions and receives commands via the CLI or the REST API. It can also communicate with other daemons to manage its services. The
Docker daemon pulls and builds container images as requested by the client. Once a requested image has been pulled, it builds a working model for the container by utilizing a set of instructions known as a build file.
The build file can also include instructions for the daemon to pre-load other components prior to running the container, or instructions to be sent to the local command line once the container is built.
There are a few basic terminologies that you will hear while working with the docker.
Let's take an idea about it.
Docker terminology
- Container
- Image
- Base Image
- Image layer
- Registry
- Repository
- Tag
Container
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.
Image
An image is a read-only template with instructions for creating a Docker container. Most Often, an image is based on another image, with some additional customization.
Base Image
A Base Image is an image that has no parent layer. Typically, a base image contains a fresh copy of an operating system. Base images normally include the tools (yum, rpm, apt-get) necessary to install packages or update the image included in them.
Image Layer
Repositories are often referred to as images or container images, but actually, they are made up of one or more layers. Image layers in a repository are connected together in a parent-child relationship. Each image layer represents changes between itself and the parent layer.