Docker's simple to understand

What is the Docker

Docker is a cloud-based open source projects Go language, is a container application engine open source, Docker solve the problem of the operating environment and configuration, easy to do continuous integration while contributing to the overall release.

Why Docker

After completion of software development, developers are generally the jar or bag operation and maintenance personnel to the war package, do the deployment and published by operation and maintenance personnel, but due to the war package or jar package actually contains only a code, a program run successful, need to rely on the system configuration and environment and development are generally dependent on their local environment and configuration to do a self-test, and then if the environment and the development of local transport inconsistent deployment of peacekeeping, it is likely to lead to code that does not correct run, such as the use of different JDK version, low version can not use some of the features of high version, install different versions of middleware, some Api may have changed and so on, will cause the program can not do the same as in the local running correctly . This time will think that there is no way to be able to successfully run the system environment and configuration, these codes are labeled as a package it together, Docker did just that, but Docker put this package called mirroring. Be a simple analogy is, for example, when transplanted plants, soil is the environment it is assumed that the successful growth of the past are transplanted directly from the earth dug up and plant it in their own backyard in the land, using their own backyard soil, soil a variety of different parameters, the plants will lead to the emergence of various problems, which docker time comes, it is recommended when transplanted plants, the soil planted plants also dig back so though they are in their own back yard, but the plant growth environment, but It is not changed, or old dirt, naturally grown successfully. docker relatively popular understanding, to bring the software environment installation, installation, takes on exactly the same as the original environment so that developers will not need to earnestly explaining: "No, ah, I can run it locally . " Of course, docker once generated image, you can do once created, run everywhere, and the JVM is a bit like, which ensures that when you do a cluster and expansion, do not repeat the cycle is installed on each machine work initially defined with a mirror, the mirror used to generate the respective container directly run just fine.

Docker three elements

Image (Image): Docker image (Image) is a read-only template that can be used to create a mirror image Docker container, a mirror can create a lot of container, it can be understood as in Java classes.

Container (Container): the container is an example of mirroring, is mirrored by running instance is created, can be understood in the container into Java objects.

Warehouse (Repository): the warehouse is a centralized place to store the image file, it is easy to understand analogy to github, so the warehouse can be divided into public warehouses and private warehouses in two forms.

Published 289 original articles · won praise 302 · views 50000 +

Guess you like

Origin blog.csdn.net/weixin_38106322/article/details/105041911