This is the 27th day of my participation in the August Genwen Challenge.More challenges in August
What is a Docker
Docker is not a programming language or a framework for building software, Docker is a tool that helps solve common questions about how to install, dismantle, upgrade, distribute, trust, and manage software.
Docker includes a command line program, a background daemon, and a set of remote services. It solves common software problems and simplifies installing, running, distributing, and removing software. All of this is possible through the use of container technology.
The container
Docker containers differ from virtualization in that virtual machines provide virtual hardware that can install an operating system and other programs. However, the resource overhead is high and the creation time is high. Containers do not use virtualization. Programs running in a container deal directly with the Linux kernel, and because there is no middle layer, the resource consumption is relatively small.
Software runs in isolation containers
Docker doesn’t provide container technology, but it does make containers easier to use. Command-line tools run in memory in user-space, and ideally, programs running in user-space cannot modify memory in kernel-space. The following is an example of a basic container running on a computer system structure:
Running Docker can be said to be running two programs in user space, one is the Docker daemon, one is the Docker CLI, in fact, Docker program with user interaction. If you want to start, stop or install the software, you can use the Docker CLI to execute corresponding commands.
As you can see in the figure above, each container is run as a subprocess of the Docker daemon, encapsulated in the container, and authorized to run in its own user-space storage subspace. A program running in a container can access only its own approved memory space and resources.
Distribution of the container
Docker encapsulates traditional containers through a package and distribution software. The component that plays the role of container distribution is called an image.
The mirror
A Docker image is a bundled snapshot of all the files running a program in a container. An image can create many containers, but these containers do not share files. The Docker distribution software distributes these images and creates containers on the receiving machine. Mirroring is the basic unit of deliverable in the Docker ecosystem.