Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to easily understand Docker

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces you how to easily understand Docker, the content is very detailed, interested friends can refer to, hope to be helpful to you.

As a member of the IT circle of cloud computing, if you don't know Docker, it's out. However, before you understand Docker, you have to learn about Docker's road to fame!

From dotCloud to Docker, "open" Naruto! Docker slogan 1:Build, Ship and Run

To understand Docker, first look at the first sentence of its slogan: "Build, Ship and Run", that is, "build, send and run".

Take building a house as an example:

If you want to build a house on a vacant lot, you have to draw pictures, move bricks and get materials. After a meal of operation, the house is finally built.

As a result, I lived for a period of time and wanted to move to another vacant lot. At this time, according to the previous method, we can only draw pictures, move bricks, get materials, and build houses again.

But if you can make a copy of the house you built before, make it into a "mirror image" and put it in your backpack. When you get to the new open space, it will be much easier to copy and paste a house with this "mirror image".

Docker slogan 2:Build   once,Run   anywhere

Docker's second slogan is: "Build   once,Run   anywhere."

Here we will involve three core concepts of Docker, which are:

Mirror (Image)

Container (Container)

Warehouse (Repository)

In the above example, the "mirror" in the package is the Docker image. And the backpack is the Docker warehouse. In the open space, the house built with copy and paste is a Docker container.

This Docker image is a special file system. In addition to providing the programs, libraries, resources, configuration and other files needed by the container to run, it also contains some configuration parameters (such as environment variables) prepared for the runtime. The mirror does not contain any dynamic data, and its content will not be changed after it is built.

In other words, every time the house is changed, the house is the same, but the daily necessities and so on are regardless of who lives and who is responsible for the purchase.

Each mirror image can make a kind of house, and multiple mirrors can make many kinds of houses. For example, some people have built villas and created images; some people have built courtyards and created images; others have built thatched huts and have also created images.

In this way, we can exchange images with each other, you use mine, I use yours, isn't it a win-win situation?

As a result, it became a large public warehouse.

The Docker repository is used to store our "image". After creating an "image", you can use the push command to upload it to a public or private repository, so that the next time you want to use this "image" on another machine, you just need to pull it from the repository.

The person responsible for managing Docker images is the Docker Registry service (similar to the warehouse administrator). But not any image built by anyone is legal. What if someone builds a house with a problem?

Therefore, the Docker Registry service is very strict in managing mirrors. Official Docker Hub is the most commonly used Registry public service, which is also the default Registry, and has a large number of high-quality official images for users to download.

Docker cannot run without the support of the above, and some people will mistakenly think that Docker is a container. But Docker will only say proudly, "I am not a container, I am a tool for creating containers, I am an application container engine."

On how to easily understand Docker to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report