A, docker basic concept

A, docker basic concept

1.docker basic components

1.1 Mirror (image)

  Docker image (Image) is a read-only template. Docker containers can be used to create a mirror, a mirror can create a lot of container .

1.2 warehouse (repository)

  Warehouse (Repository) is a centralized place to store the image file.

  Warehouse (Repository) and warehouse registration server (Registry) is different. Registration on warehouse server often contains several warehouses, each warehouse also contains a number of mirrors, each mirror has a different label (tag).

  Warehouse is divided into two forms of public warehouses (Public) and private warehouse (Private).

  The warehouse is the largest publicly Hub Docker ( https://hub.docker.com/ ),

  Store a huge number of images available for users to download. Domestic public warehouse, including Ali cloud, cloud, etc. Netease

 

1.3. Container (Container)

  Using Docker container (Container) a stand-alone or a group of applications. Examples of containers are run by the mirror created.

  It can be started, start, stop, delete. Each container is isolated from each other to ensure the safety of the platform.

  The container can be seen as a simple version of the Linux environment (including root privileges, process space, user space and cyberspace, etc.) and running within the application.

  And the container defines a mirror almost exactly the same unified perspective is a pile layer, the only difference is that the uppermost layer of the container that is readable and writable.

 

1.4 Summary:

  It requires proper understanding warehousing / mirror / container these concepts:

  Docker itself is called a carrier or container management engine running. We depend on the application and configuration of the operating environment packed form a deliverable, this package seems a good operating environment on the mirror image file. Only through this Docker image file to generate container. image files can be seen as a template container. Examples vessel image file generated according Docker. The same image file, the container may generate a plurality of instances running simultaneously.

* Container instances generated image file itself is a file, called the image file.
* A container to run a service, when we need to, you can create an instance of the corresponding run by docker clients, which is our vessel
* As for storage, is put a bunch of local mirror, we can publish to mirror storage, the time needed to pull down from the warehouse in it.

 

2.docker principle

2.1docker how it works?

  Docker is a Client-Server system structure, Docker daemon running on the host, and then connect the access from the client through the Socket, the daemon accepts commands from the client to run and manage the container on the host. Container is a runtime environment, what we said before container.

Why 2.2docker faster than VM?

  (1) docker has less than a virtual machine abstraction layer . Hardware resources by the right foot docker do not need Hypervisor virtualization, hardware resources are actual physical machine to run the program on a docker container directly. So docker will have obvious advantages in efficiency on the CPU, memory utilization.

  (2) docker host is using the kernel, the OS without the Guest . Therefore, when a new container, docker and do not need to reload the virtual machine as an operating system kernel. Still seeking to avoid lead, load the operating system kernel returned a relatively time-consuming and resource-intensive process, when a new virtual machine, the virtual machine software to be loaded Guest OS, a new process is returned to minute levels. Because of the direct use of docker host operating system, then a return process is omitted, so a new container docker takes only a few seconds.

 

Guess you like

Origin www.cnblogs.com/bufufan/p/11962491.html