Docker's past and presentDocker is an open-source Cloud project based on the Go language. Currently, it belongs to the Apache Foundation and complies with the Apache 2.0 protocol. The company was born in early 2013. Its predecessor was dotCloud. Since docker was open-source, it has been widely concerned by the society. The docker ecosystem has gradually matured, and the company has also changed its name to Docker Inc, focuses on Docker-related technologies and product development.
The biggest goal of Docker is: "Build, Ship and Run Any App, Anywhere !". You only need to encapsulate application components once to build and run your application anywhere. Whether it is a complete application, or some microservices, or even a complete operating system, it can become a docker application component. Docker provides an efficient, agile, and lightweight container solution that dynamically adapts to system deployment needs of various scales.
The entire Docker lifecycle includes three parts: Image, Container, and Repository ). The relationship between images and containers is like programs and processes. images are a prerequisite for running containers, while containers are a running instance of images. The repository is the image management center. The default image repository is Docker Hub.
Before Running Docker containers, check whether the local image exists. If the image does not exist, download the image from the default image repository. After the image is instantiated, a complete container is run. In addition to the image content, the container also provides an additional writable file layer and a relatively independent Runtime Environment (which may be some applications or services, it may also be a complete operating system ).
As a C/S model project, Docker manages images, containers, daemon, and partitions through Docker Host, and pulls images from Docker Client, generally, the Host and Client may be on the same machine.
Docker Open Source Code address: https://github.com/docker/docker
Unique Advantages of DockerNew deployment MethodAssume that there is a scenario: "due to business growth, a website project of the company needs to be migrated to a new server ". According to the traditional scheme, we may need to do some repetitive work. First, install the corresponding runtime environment and dependencies on the new server, such as LAMP (Linux + Apache + Mysql + PHP ), after creating a user or group and managing file permissions, You need to test the environment before deploying and launching the environment. Imagine how many times of such a requirement would have to be repeated.
You may say that you can package the entire environment into an image through virtualization technology for deployment. adding a new server itself is also a virtualized machine, plus a layer of xen (or other virtual machines) deployment is obviously redundant.
Docker provides an extremely simple way to package applications through containers. We can package applications by encapsulating them into images or compiling Dockerfile, this means that you only need to start the required container on the new server. It saves a lot of time and reduces the risks caused by problems in the deployment process.
Innovation in O & M strategies1. fast delivery and deployment
With docker, developers can use images to quickly build a standard development environment. This image can be reused in subsequent testing and launch processes to deploy applications in a testing or production environment. Docker can quickly create and delete containers and keep the configuration and operation process of each step, reducing the development, testing, and deployment time and making environment deployment easier to understand. With simple configuration file modifications, you can easily complete an iteration of the runtime environment. All operations can be distributed and updated in incremental form to achieve automated and efficient container management.
2. Low performance loss
In fact, docker is kernel-level virtualization and does not require additional virtualization management programs. Therefore, enabling docker almost ignores the performance loss.
3. Easy migration and Expansion
Docker supports running on almost any platform. Both physical machines, virtual hosts, and even personal computers can run docker. This compatibility makes it easier for applications to switch between running platforms.
4. Standardization Standards
The standardized container execution engine-runC behind Docker. RunC is an open industrial standard contributed by docker. Its main content is as follows:
- Operation standardization: Container standardization operations include creating, starting, and stopping containers using the standard container feel, copying and creating container snapshots using the standard file system tool, and downloading and uploading using the standard network tool.
- Content independence: no matter what the specific container content is, container standard operations can achieve the same effect. For example, the container can upload and start in the same way, whether it is a php application or a mysql database service.
- Infrastructure independence: whether it is a personal laptop, AWS S3, or Openstack, or other infrastructure, all operations that support containers should be performed.
- Customized for automation: the formulation of unified container standards is one of the fundamental purposes of unrelated operation content and platform, In order to automate container operations across the platform.
- Industrial level delivery: A major goal of setting container standards is to make Software Delivery possible to achieve industrial level delivery.
5. Cluster Management
Kubernetes is Google's open-source Docker container cluster management system. It provides a set of functions for containerized applications, such as resource scheduling, deployment and operation, service discovery, and resizing, essentially, it can be seen as a mini-PaaS Platform Based on container technology.
For comparison between Docker and virtual machines, see: http://www.linuxprobe.com/docker-and-vm.html
For Docker standards, see: http://www.open-open.com/lib/view/open1444481959869.html
SectionThe full text mainly gives a conceptual introduction to docker. I think docker will no longer be a strange technology here. Docker can provide a set of excellent solutions for automated application O & M and PAAS management policies. docker is favored in the field, this gives O & M services an unprecedented quality experience. If you are also deeply impressed by the charm of docker, you are welcome to join the study of docker to explore together.
Address: http://www.linuxprobe.com/docker-tours-1.html