Docker vs VM(Virtual Machine)

First, the contrast
can be seen from the chart below, VM is a complete operating system running on the host machine, VM runs its own operating system will take up more CPU, memory, Camp resources. Docker Unlike the VM, applications, and contains only dependencies, based libcontainer running on the host, and in an isolated environment, which makes Docker more efficient and lightweight, only a few seconds to complete the starting container. Since Docker lightweight, occupy less resources, so that the application can easily Docker to build applications in a standardized. But Docker is still not perfect, such as isolated as effective as VM, shared some basic library host operating system, and so on; the network configuration function is relatively simple, mainly to bridge the main way; view the log is not enough convenient and flexible.
Here Insert Picture Description
Docker containers on the basis of carried out further package from the file system, networking to process isolation, etc., which greatly simplifies the creation and maintenance of the vessel. Docker making technology more portable than the virtual machine technology and fast.
As a new approach to virtualization, Docker, compared with the traditional approach to virtualization has many advantages. Start Docker container can be achieved in the second stage, this virtual machine compared to the traditional way is much faster; Docker high utilization of system resources, can run thousands of Docker containers on a host computer at the same time.

Two, related concepts Docker
Docker CS structure is divided into server and client, there are two concepts:
1, Docker daemon (server): running on the host, Docker daemon, the user Docker client (Docker command ) interact with Docker daemon
2, Docker client: Docker command-line tool, the user is the main way to use the Docker, Docker Docker Client with a communication daemon and the results returned to the user, may be accessed remotely Docker Client via the socket or Restful API daemon Docker
Here Insert Picture Description

3, Docker image: image is read-only mirror contains files needed to run. Container used to create the image (of the container), a mirror can run multiple Container; Dockerfile image by creating, can be downloaded from the Docker hub / registry.
3, Docker container: the container is running Docker components, a start image is a container, which is an isolated environment, a plurality of containers not affect each other, to ensure the running of a vessel in a relatively safe environment.
4, Docker hub / registry: share and manage Docker image, the user can upload or download the above image, the official address https://registry.hub.docker.com/, you can also build their own private Docker registry
mirror equivalent packaged version, after the mirror up and running in a container, where the warehouse is installed to store the image.

Published 11 original articles · won praise 0 · Views 138

Guess you like

Origin blog.csdn.net/weixin_40366765/article/details/104050994