docker has a deep understanding of the concepts of mirroring containers warehouses and so on

  • 2020-05-17 07:19:58
  • OfStack

docker basic concepts of mirrors, containers, and warehouses

The mirror

1.Docker mirror is a read-only template.

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

2. Mirroring can be used to create Docker containers.

3. Docker provides a very simple mechanism to create an image or update an existing image, and users can even download a ready-made image from someone else and use it directly.

The 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 image is read-only, and the container creates a writable layer at startup as the top layer.

warehouse

A repository is a centralized repository for mirrored files. Sometimes the warehouse and the warehouse registration server (Registry) are mixed into 1, not strictly distinguished. 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. It serves as the default docker repository, but downloads are slow in 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 repository is similar in concept to Git, and the registration server can be understood as a hosted service like GitHub.

docker container installation

RedHat/CentOS must be at least version 6.6, or 7.x to install docker. It is recommended to use docker on RedHat/CentOS 7, because RedHat/CentOS 7 has upgraded to kernel 3.10 for lxc container support.

Install docker centos6. 6


rpm -ivh http://mirrors.yun-idc.com/epel/6Server/x86_64/epel-release-6-8.noarch.rpm
 
yum install docker-io       
 
chkconfig docker on
 
service docker start
 
docker version

Startup encountered problems

Question: Docker#docker dead but pid file exists

Solutions:

yum-config-manager --enable public_ol6_latest
yum install device-mapper-event-libs

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


Related articles: