Docker tutorial on the basic concepts of of mirroring container warehouse details

  • 2020-06-01 11:17:39
  • OfStack

The mirror

Docker includes three basic concepts

Mirror image (Image) Container (Container) Warehouse (Repository)

Once you understand these three concepts, you understand the entire life cycle of Docker.

Docker mirror

The Docker mirror is a read-only template.

For example, an image can contain a full ubuntu operating system environment with only Apache or other applications installed for the user.

Mirroring can be used to create Docker containers.

Docker provides a simple mechanism for creating an image or updating an existing image, and users can even download a ready-made image from someone else to use it directly.

Docker container

Docker USES containers to run applications.

The container is a running instance created from the image. It can be started, started, stopped, deleted. Each container is an isolated, secure platform.

Think of the container as a simplified version of the Linux environment (including root user permissions, process space, user space, and network space) and the applications running in it.

Note: the mirror is read-only, and the container creates a writable layer at startup as the top layer.

Docker warehouse

A repository is a centralized repository for mirrored files. Sometimes the warehouse and the warehouse registration server (Registry) are mixed into 1, and the distinction is not strictly made. In fact, the warehouse registry server often houses multiple warehouses, each containing multiple images, each with a different label (tag).

Warehouses are divided into public warehouses (Public) and private warehouses (Private).

The largest public repository is Docker Hub, which holds a large number of images for users to download. Domestic open warehouses include Docker Pool and so on, which can provide more stable and fast access for users in mainland China.

Of course, users can also create a private repository within the local network.

Once the user has created his own image, he can use the push command to upload it to a public or private repository, so that the next time he USES the image on another machine, he can simply drop pull from the repository.

Note: the Docker warehouse is similar in concept to Git, and the registration server can be understood as a hosting service like GitHub.

Thank you for reading, I hope to help you, thank you for your support of this site!


Related articles: