docker 1 Getting real

A. Getting docker

Personal Hosting age than the CPU clock speed and memory size level, cloud computing era virtualization technology foundation.

Virtualization can be implemented in hardware simulation, it can also be achieved through the operating system.

Full use of the mechanisms and features of the operating system itself, to achieve lightweight virtualization, docker is a leader.

 

1.1 What is a docker

https://github.com/docker/docker

"Build,Ship,and Run Any App,Anywhere"

By packaging of application components (Packaging), distribution (Distribution), deployment (Deployment), running (Runtime) and other management lifecycle, application components to achieve the level of "package once, run anywhere." Here's application components, can be a Web application, it can be a database service, or even an operating system or compiler.

 

Linux container Technology:

Docker base engine is a Linux container (Linux containers, LXC) technology.

Container effectively divided by a single operating system managed resources to isolated groups to better balance the conflicting resources between isolated group needs. Compared with virtualization, it is neither required instruction-level simulation and does not need time compilation. Containers can be run locally in the core CPU instructions, without any specific explanation mechanism. In addition, it avoids the complexity and replace paravirtualization system call.

 

From Linux containers to docker:

In LXC technical basis, docker further optimize the user experience of the container. docker provides a variety of container management tools (such as distribution, release, migration, etc.) to allow users without concern underlying the operation can be concisely management and use of container. User Action docker container operations as a lightweight virtual machine that simple.

Docker container may be understood as a sandbox. Running an application in each container, separated from each other in different containers, may establish a communication mechanism between the container. Creating and stop the container are very fast, their demand for container resources is very limited, far below the virtual machine.

 

1.2 Why docker

docker container benefits of virtualization:

When the server migration, often need to re-deploy and debug these trivial uninteresting work greatly reduces the work efficiency.

The docker provides a more clever way to package the application through the container, the container needs to be started only means that migration needs on a new server on it. This will save a lot of time and reduce the risk of deployment problems.

 

docker in the development and operation and maintenance advantages:

1) faster delivery and deployment. Docker use, developers can use the mirror to quickly build a standard development environment; development is completed, testing and operation and maintenance personnel can be directly used to deploy the same environment code.

2) more efficient use of resources. run docker container does not require additional hypervisor (virtual machine manager, VMM, and hypervisor) support, which is a kernel-level virtualization, can achieve higher performance, while low demand for additional resources.

3) easier migration and expansion. docker container can run on almost any platform , including physical machines, virtual machines, public cloud, private cloud, PCs, servers and so on. Users can easily migrate applications between different platforms.

4) more simple update management. Use dockerfile, only a small configuration changes, you can replace a lot of conventional updating. And all modifications are incrementally updated and distributed, enabling automated and efficient container management.

 

docker comparison with the virtual machine:

As a virtual way a lightweight, docker run the application on a virtual machine with the traditional way has significant advantages compared to:

1) docker container quickly, starting and stopping can be achieved at the second level, the virtual machines much faster than the traditional way. .

2) docker container needs very little system resources, you can run thousands of docker container at the same time on a single host.

3) docker to facilitate operation by the user similarly git acquisition, distribution and updating applications image, instruction simplicity, low cost learning.

4) docker to automate the creation and support flexible deployment mechanism by dockfile profile, improve work efficiency.

 

In addition to applications running docker container therein, substantially without consuming additional system resources to ensure application performance while minimizing system overhead. N traditional virtual machine run different applications will start the N virtual machine (VM needs to be allocated for each exclusive memory, disk resources, etc. separately), but only needs to start the N docker isolated containers, and applied onto the container can be.

 

characteristic container virtual machine
Start-up speed Second-class Minute level
Hard drive Typically MB Typically GB
performance Near native Weaker than
System support amount Single supports thousands of containers General dozens
Isolation Security isolation Completely isolated

 

 

 

 

 

 

Isolation of virtual machines better than the container isolation.

 

1.3 virtualization and docker

In computer technology, virtualization (virtualization) is a resource management technology, the various entities is the computer's resources, such as servers, network, memory and storage, etc., to be abstract, presented after conversion, can not break the inter-entity structure cutting obstacles, so that users can better than the original configuration of ways to use these resources.

Virtualization technology can be divided into hardware-based virtualization and virtualization-based software.

Based on the level of virtualization software from the object is located, it can be divided into virtualization and application virtualization platform. The former generally refers to the number of analog devices such software or wine. The latter can be subdivided into the following subclasses:

1) full virtualization. During the execution of a complete hardware environment and the underlying virtual machines simulate privileged instructions, guest operating systems without modification.

2) hardware-assisted virtualization. Using the hardware (mostly CPU) auxiliary support handle sensitive instructions to implement fully virtualized capabilities, client operating systems without modification.

3) section virtualization. Only for the part of the hardware resources virtualized guest operating systems need to be modified, and now some earlier versions of virtualization technology is only part of the support virtualization.

4) paravirtualization. Some hardware interfaces provided in the form of software to the client operating system, the guest operating system needs to be modified.

5) operating system-level virtualization. Kernel to isolate different processes by creating multiple virtual operating system instances (kernel and libraries). In this related art container i.e. category.

 

The traditional way is to implement virtualization at the hardware level, the need for additional virtual machine management application and virtual machine operating system layer.

docker container is a virtualized, direct reuse of the local host operating system on the operating system level, and therefore more lightweight.

A layer of a conventional virtual machine virtual machine management system on the host operating system and hardware layer, on top of this operating system of each virtual machine, then the runtime environment and applications.

docker docker container is a container with a layer supported on the host operating system and the hardware layer, on top of this is to run each application and application environment.

 

Guess you like

Origin www.cnblogs.com/cjj-ggboy/p/12623886.html