Mirror docker contact with the container, a storage drive

Contact 2.1 docker image of the container, storage drives
what is mirrored? Simply put, docker is a mirror that does not contain the Linux kernel yet streamlined Linux operating system.
Mirroring come from? Docker hub is the responsibility of the docker public registry maintained by the company, including a large number of containers mirroring, docker default tool from the public image library download mirror:
https://hub.docker.com/explore
default is foreign sources, will download slow, domestic mirror configuration repository is recommended:
[the root @ localhost ~] Vim /etc/docker/daemon.json #
{
"Registry-mirrors": [ " https://registry.docker-cn.com "]
}
after the configuration restart docker: [root @ localhost ~] # systemctl restart docker
after the reboot is complete we can first try to download a docker mirror:
[root @ localhost ~] # docker pull nginx

We use docker pull command has finished downloading nginx mirror, then we use docker images that we have to view the downloaded image:
[root @ localhost ~] # docker images

If we need to download a version of nginx1.12 mirror, then we can execute the following command to complete:
[root @ localhost ~] # Docker pull nginx: 1.12
Next we verify nginx1.12 is not downloaded version of mirroring:
[root @localhost ~] # docker images

Mirroring the container Contact:

Mirroring is not a single document, but a plurality of layers. We can view the contents and size of the image layers by docker history <ID / NAME>, each corresponding to one instruction in dockerfile. The default Centos Docker image storage / var / lib / docker / overlay2 in.
[root @ localhost overlay2] # docker history nginx

In fact, it is the top container mirror layer add a layer to read and write any file in the running container made changes, will write to the write layer. If the container is removed, the uppermost layer of literacy also deleted, the changes will be lost. Docker storage drive using the image management and content of each layer of the container layer can be read.
Storage drive:

Guess you like

Origin blog.51cto.com/13908858/2432326