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

What problem did Docker solve?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces what problems Docker has solved, the content is very detailed, interested friends can use for reference, I hope it can be helpful to you.

Docker is in its heyday these days, and its information is everywhere. What problems do you think it has solved? What are the application scenarios?

There is obviously no standard answer to this question. The interviewer just wants to see if you have your own ideas and are sensitive to new technologies. If your views coincide with those of the interviewer, you will definitely get extra points.

The following are the author's personal views, tap ~

1. The program runs well with me, but why not with you? This is a typical application scenario, Docker image contains all the runtime dependencies that the program needs, such as java programs, must include jdk; such as Python programs in image, and must include the corresponding version of Python interpreter in image. The program runs well with me, but I can't go to you. It's obviously an environmental problem. Docker packages the entire runtime environment into image, so the environment dependency problem is solved!

Is that important? It's really important! If you have made a deployment or release system, you will be deeply impressed by this.

We know that a program needs several parts to run: code + running environment + configuration + dependent services. Of course, the code is the same code, different environments are the same, usually there will be no problem, Docker image includes the runtime environment + configuration, which is quite friendly to deployment. If you haven't done this kind of system (in fact, most people haven't done it), but you must have installed software, does it drive you crazy when installing some complex software because of version dependencies or compilation parameters? With Docker, there is no such problem:

Docker pull xxx; docker run xxx; done:)

So to sum up: Docker solves the problems of running environment and configuration, facilitates release, and facilitates continuous integration.

2, the system is good card, there must be another buddy's program in the current server is very awesome, 128G memory, 24 CPU,Linux itself is a multi-tenant operating system, can be shared by many people, but if a program eats memory and CPU, takes up too many system resources, which will affect the operation of other programs.

The problem that several colleagues in a company share a machine can be solved through internal coordination and communication. But what about the cloud hosting provider? Different users do not know each other and share a powerful computer. as a result, a program runs out of resources, and users must not like it.

So the virtual machine appeared, good to do the resource isolation, different users do not interact with each other, will not affect each other, the world is suddenly quiet. However, virtual machines have disadvantages: the creation speed is slow, and it is troublesome to migrate, because a layer of guest os is added in the middle, and with the loss of performance, a powerful machine will create more than a dozen virtual machines, which is too wasteful.

Compared with the heavyweight virtualization solutions of virtual machines, some isolation schemes at the kernel level of Linux let people see hope. Cgroups, namespace, tc, quota, chroot, lxc, and finally, Docker appeared. Docker uses these mature technologies to make virtualization lightweight, creating a container in an instant, seconds! The cpu instruction set is no longer translated and executed, and the performance loss is very small. Although the isolation is not as thorough as the virtual machine, and the security is slightly worse, it can basically be used, so don't worry too much:)

So to sum up: lighter virtualization saves the performance loss of virtual machines.

The above two points are the problems solved by Docker, so what are the application scenarios?

In fact, one or two can be seen from the above description.

1. Program distribution. The installation of gitlab is disgusting, so someone did the image of gitlab.

2. Deployment and release, which is very helpful to the students of operation and maintenance.

3. PaaS,tsuru and flynn are all based on Docker, and CloudFoundry also needs to be migrated from warden to Docker.

About what problems Docker solved to share here, I hope that 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