1.2 Docker basis of presentation (simple articles)

What is the Docker

Docker is to publish all environmental procedures needed to run packaged together, automated operation of the vessel; is an open source project, supports most linux distributions, above the operating system level virtualization technology. The container is full use of the sandbox mechanism will not have any interface with each other.

Docker Chart

  1. Figure Composition
    image

  2. Traditional hypervisor composition diagram
    image

  3. Docker container architecture diagram
    image

Docker advantages and disadvantages

Compared to traditional VM Hypervisor Docker containers and FIG composition:

project Traditional virtual machine Docker virtual machine
take up space "Big" GB magnitude "Small" M magnitude
Start-up speed "Slow" minute levels "Fast" in milliseconds.
Resource utilization "Low" means a physical machine plurality of virtual operating systems "High" means a physical machine operating system to start a plurality of containers
Run basis "Hypervisor" CPU Virtualization Technology "Linux kernel" linux kernel virtualization
deploy "Complicated" to install the operating system and then install the application "Convenient" direct boot image
isolation Operating system level Container-based namespace isolation level
Intercommunication "Simple" inter-OS communication "Complex" communication between containers

Docker Chart description:

Docker has the following components:

Docker Client Client Access Management Docker Docker Daemon mirrored by Api

Creating Docker Daemon daemon is responsible for Docker mirror, delete, start, stop and other services

Docker Image mirroring a "read-only" system CD

Container Docker Docker container vessel, Docker Images running instance.

Docker Registry : Docker Images的仓库,Dock Hub https://www.dockerhub.com

image

Docker using a client - server (C / S) architecture model, using remote API to create and manage Docker containers. Docker Docker container created by the mirror. Relationship between the container and the mirror similar to object-oriented programming and object class.

Docker daemon as a server accepts requests from clients and deal with these requests (create, run, distribute containers). The client and server can either run on a machine, but also to communicate through the socket or RESTful API.

What Docker do?

The packaged applications and deployment automation

Create a lightweight, intimate environment PAAS

Automated testing and continuous integration / deployment

Deployment and expansion webapp, databases and back office services

Docker basic concepts

Docker includes three basic concepts

镜像 (Image)

Docker image is a special file system, in addition to providing the desired containers run programs, libraries, resources, and other configuration files, further comprising a number of configuration parameters for the preparation of runtime (e.g. anonymous volume, environment variables, user, etc. ). Image does not contain any dynamic data, its contents will not be changed after the construct.

When constructing the mirror, will build a layer, the previous layer is the basis of the latter layer. Each layer you've built will not change, any change in the level occurs only in his own this layer. For example, one file before delete operation, the actual not really delete the previous layer files, but only deleted in the current layer mark for the file. When the final container to run, though not seen this document, but in fact the file will always follow the mirror.

Container (Container)

Mirror image (Image) and the container (Container), like object-oriented programming classes and instances, the mirror is statically defined, the container is a solid mirror runtime. Container can be created, start, stop, delete, pause.

Warehouse (Repository)

It may comprise a plurality of Docker Registry repository (the Repository); each warehouse may comprise a plurality of tags (the Tag); each tag corresponds to a mirror.

Guess you like

Origin www.cnblogs.com/l-hh/p/12567310.html