Article directory
1. Introduction to Docker
Docker
It is an open source application container engine, based on the Go language and open source in compliance with the Apache2.0 protocol;
Docker
It allows developers to package their applications and dependencies into a lightweight, portable container, and then distribute them to any popular Linux machine, and virtualization is also possible.
2. Docker architecture
1. Docker client and server
Docker
It is a program of client-server ( C/S
) architecture.
Docker
The client just needs Docker
to make a request to the server or daemon, and the server or daemon will do all the work and return the result.
Docker
A command-line tool is provided docker
as well as a complete set RESTful API
.
You can run the daemon and the client on the same host Docker
, or you can connect from a local client to a remote daemon Docker
running on another host .Docker
The following diagram depicts Docker
the architecture:
2. Docker architecture diagram
3. Docker running flowchart
Three, Docker three elements
Docker
The three basic elements of : image ( Image
), container ( Container
), warehouse ( Repository
)
1. Image
Mirroring is the cornerstone of container construction and is based on 联合文件系统(UnionFS)
a layered structure.
It is built from a series of instructions and is a lightweight, executable, independent software package for packaging software runtime environments and software developed based on runtime environments (code, runtime, libraries, environment variables, and configuration files).
Docker
mirror( image
) is a read-only template. Images can be used to create Docker containers, and one image can create many containers
2. Container
Docker
container
An application or group of applications that run independently using a container ( ).
A container is a running instance created using an image (compared to the concepts of classes and objects in Java).
Containers can be started, started, stopped, deleted. Each container is isolated from each other to ensure a secure platform.
The container can be regarded as a simple version of the Linux environment (including root user name authority, process space, user space and network space, etc.) and the applications running in it
3. Repository
Warehouse ( repository
) is a place where image files are stored centrally.
The Docker company provides a public mirror warehouse Docker Hub
( https://hub.docker.com ), which provides a huge collection of mirrors for use.
A Docker Registry
can contain multiple warehouses ( Repository
), each warehouse can contain multiple tags ( Tag
), and each tag corresponds to an image.
Usually, a warehouse will contain images of different versions of the same software, and the tags correspond to each version of the software. We can use <仓库名>:<标签>
the format of to specify which version of the software is the mirror image. If no label is given, will be used latest
as the default label.
For more details, please refer to :
Docker architecture and working principle-docker dynamics-docker Chinese community
Docker architecture and its three elements - DeepInThought - Blog Park (cnblogs.com)