Understanding the core concepts of docker

Reference book: "Docker technology entry and actual combat"

1. Docker core concept includes three

Image

Container

Repository

docker image:

A Docker image is similar to a virtual machine image, and it can be understood as a read-only template.

For example, an image can contain a basic operating system environment in which only Apache applications (or other software required by the user) are installed. You can call it an Apache image. Images are the basis for creating Docker containers. Through version management and an incremental file system, Docker provides a very simple mechanism to create and update existing images, and users can even download a ready-made application image from the Internet and use it directly.

docker container:

Docker containers are similar to a lightweight sandbox. Docker uses containers to run and isolate applications. A container is an application running instance created from an image.

It can be started, started, stopped, and deleted, and these containers are isolated from each other and invisible to each other. You can think of the container as a simple version of the Linux system environment (including root user rights, process space, user space, network space, etc.) and a box of applications running in it.

docker warehouse:

The Docker warehouse is similar to the code warehouse, which is a place where Docker centrally stores image files. 

Sometimes we confuse the Docker warehouse with the warehouse registration server (Registry), which is not strictly distinguished. In fact, the warehouse registration server is where the warehouse is stored, and there are often multiple warehouses on it. Each warehouse centrally stores a certain type of image, which often includes multiple image files, which are distinguished by different tags. For example, a warehouse for storing Ubuntu operating system images, which may include images of different versions such as 16.04 and 18.04. An example of a warehouse registration server is shown in Figure 21. According to whether the stored images are shared or not, the Docker warehouse can be divided into two forms: public warehouse (Public) and private warehouse (Private). At present, the largest public warehouse is the official Docker Hub, which stores a large number of images for users to download. Many domestic cloud service providers (such as Tencent Cloud, Alibaba Cloud, etc.) also provide local sources of warehouses, which can provide stable domestic access. Of course, if users do not want to share their own image files publicly, Docker also supports users to create a private warehouse within the local network that can only be accessed by themselves. After the user creates his own image, he can use the push command to upload it to the designated public or private warehouse. In this way, the next time the user uses the image on another machine, he only needs to pull it from the warehouse. ,

 

Guess you like

Origin www.cnblogs.com/duaner92/p/12728864.html