Docker is an open-source engine that makes it easy to create a lightweight, portable, self-sufficient container for any application. Developers who compile tests on notebooks can be deployed in batches in a production environment, including VMS (virtual machines), bare metal, OpenStack clusters, and other underlying application platforms.
Docker is typically used for the following scenarios:
- Automated packaging and publishing of Web applications;
- Automated testing and continuous integration, release;
- Deploy and tune databases or other back-end applications in a service-oriented environment;
- Build your own PAAs environment by compiling from scratch or by extending your existing OpenShift or cloud foundry platform.
Simply put, Docker is a "container" for programs written by the Go language (Linux containers, LXCS); At present, the cornerstone of cloud services is operating system-level isolation, virtual multiple hosts on the same physical server. Docker implements an application-level isolation; It changes our basic development, Operation unit, by direct Operation Virtual Host (VM), to the "container" that the operation program runs.
Docker is an open platform designed for developers and system administrators to publish and run distributed applications. Consists of two parts:
- Docker Engine: A portable, lightweight running environment and package Manager. (Note * Single OS vs single thread, is it special like Nodejs?)
- Docker Hub: A cloud service created for creating automated workflows and sharing apps. (Note * Cloud image/Package Management vs NPM package management, is it special like NPM?)
Docker extends the Linux container (Linux Containers), or LXC, with a high-level API that provides a lightweight virtual environment for the process alone. Docker leverages LXC, Cgroups, and Linux's own kernel. Unlike traditional virtual machines, a Docker container does not contain a single operating system, but is run based on the functionality provided by the operating system in an existing infrastructure. Here is a StackOverflow answer, which describes in great detail all the features of Docker different from pure LXC
Docker works like a portable container engine. It packs the application and all of its dependencies into a virtual container that can run on any Linux server. This greatly improves the flexibility and portability of program operation, whether it's a need for licensing, a public cloud or a private cloud, a bare metal environment, and so on.
Docker consists of the following:
1. Docker Server Daemon (server daemon), used to manage all containers.
2. Docker command-line client for controlling the server daemon.
3. Docker Image: Find and browse Docker container images. It is also visited here to get: https://index.docker.io/
The advantages of Docker with respect to VM VMS are obvious: lightweight and high performance and convenience, and the following is excerpted from the KVM and Docker LXC benchmarking with OpenStack
Superiority:
Fast
Performance at runtime can be greatly improved (classic case is 97% increase)
Administrative operations (Start, stop, start, restart, and so on) are all in seconds or milliseconds.
Agile
As agile as a virtual machine and cheaper, it's as simple as a button on bare metal (bare metal).
Flexible
"Containerized" applications and systems without adding additional operating systems,
Light weight
You will have enough "OS" to add or decrease the image. You can 100~1000 a containers container on a single server.
Cheap
Open source, free, low cost. Supported and driven by the modern Linux kernel. Note * Light weight container must be able to open more "containers" on a physical machine, destined to be cheaper than VMS.
Eco-System
are getting more and more popular, just look at Google Trends and know that Docker or LXC.
There are countless community and third-party applications.
Cloud Support
Countless cloud services provide a framework for creating and managing Linux containers.
The benefits of Docker performance can also be referenced by this IBM Engineer's performance improvement Assessment, which has been greatly improved in all aspects than VMS (OS System level virtualization).
Performance characteristics of VMs vs Docker Containers by Boden Russel (IBM)
Performance characteristics of traditional V MS vs Docker Containers
A part of the argument
Any project will be controversial, like go, like Nodejs, and Docker has some.
can be completely isolated
In a hyper-complex business system, can a single OS be completely isolated, or will a program crash/memory overflow/high CPU usage affect other containers or the entire system? Many people have doubts about whether Docker can support mission-critical systems in a real-world multi-master production environment. Note * Just as someone questioned the node. JS single thread is fast and unstable and cannot be applied in complex scenarios.
Fortunately, the Linux kernel has made a lot of improvements to container to support better isolation.
The go language is not fully mature yet
Docker is developed by the go language, but the go language is unfamiliar to most developers, and it's still improving, and it's still a long way from being mature. This half-git, half-pack management approach has made some people uncomfortable.
What is Docker?