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

Why is there a Docker?

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

Share

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

This article mainly introduces why there is Docker, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

one。 Why is there a Docker?

A product from development to launch, from the operating system, to the running environment, and then to the application configuration. As a collaboration between developers and operators, we need to care about a lot of things, which is also a problem that many Internet companies have to face, especially after the iteration of various versions, the compatibility of different versions of the environment is a test for operation and maintenance personnel. Docker has developed so rapidly because it provides a standardized solution.

The configuration of the environment is so troublesome that it is necessary to do it all over again with another machine, which is laborious and time-consuming. Many people think, can you fundamentally solve the problem, the software can be installed with the environment? In other words, during installation, the original environment is copied exactly the same.

Developers can use Docker to eliminate the problem of "working on my machine" in collaborative coding. The developer needs to clearly tell the operation and deployment team that all the configuration files and all software environments are used, but even so, deployment failures often occur.

The design of Docker image enables Docker to break the old concept of "program is application". With the exception of the operating system core, the system environment needed to operate the application is packaged from the bottom up through images, so as to achieve the seamless operation of the application across platforms. Insert the picture description here.

two。 What is Docker?

Docker is a cloud open source project based on the Goto language. The main goal of Docker is "Build,Ship and Run Any APP,Anywhere", that is, through the life cycle management of the corresponding components, such as encapsulation, distribution, deployment, operation, etc., the user's App and its running environment can be "encapsulated at once, run everywhere".

The emergence of Linux container technology solves such a problem, and Docker is developed on the basis of it. The application will be run on top of the Docker container, while the Docker container is consistent on any operating system, which enables cross-platform and cross-server. You only need to configure the environment at once, and you can deploy it on another machine with one click, which greatly simplifies the operation. Docker solves the running environment and the configuration of software containers, which facilitates continuous integration and contributes to the overall release of container virtualization technology.

three。 Virtual machine technology and container virtualization technology

A virtual machine is a solution with environment installation. It can run one operating system in another, such as running Linux in windows. The application is unaware of this, because the virtual machine looks like a real system, making the logic between the application, the operating system and the hardware unchanged.

Disadvantages of virtual machines:

Take up too many resources

Many redundant steps

Start slowly

Because of these shortcomings of virtual machines, Linux has developed another virtualization technology: Linux container (LinuxContainers, abbreviated as LXC).

Instead of simulating a complete operating system, the Linux container isolates processes. With a container, you can package all the resources needed for the software to run into an isolated container. Unlike virtual machines, containers do not need to bundle a whole set of operating systems, only the library resources and settings required by software engineering. As a result, the system becomes efficient and lightweight and ensures that software deployed in any environment can work consistently.

Compare the differences between Docker and traditional virtual machines:

The traditional virtual machine technology is that after a set of hardware is produced, a complete operating system is run on the virtual machine, and the required application processes are run on the system.

On the other hand, the application process in the container runs directly in the host kernel, the container does not have its own kernel, and there is no hardware virtualization. Therefore, the container is lighter than the traditional virtual machine. Each container is isolated from each other, each container has its own file system, the processes between containers will not affect each other, and can distinguish between computing word resources.

IV. The basic composition of Docker

The Docker image is a read-only template. Images can be used to create Docker containers, and one image can create many containers.

A Docker container (Container) is an application or group of applications that runs independently. The container is the running instance created by the image. It can be started, started, stopped, and deleted. Each container is an isolated and secure platform. Think of the container as a suggested Linux environment and applications running in it. The definition of the container is almost exactly the same as the image, and it is also a unified perspective of a bunch of layers. the only difference is that the top layer of the container is readable and writable.

The Docker repository (Repository) is the place where images are stored centrally. There is a difference between a warehouse and a warehouse registration server. Many warehouses are often stored on the warehouse registration server, and each warehouse contains multiple images, each with a different tag. Warehouses are divided into public warehouses and private warehouses. The largest open warehouse is DockerHub.

Docker itself is a container runner or supervisor engine. We package the application or configuration dependencies to form a deliverable runtime environment that looks like an image image file. The Docker container can only be generated from this image file. The image file can be thought of as a template for the container. Docker generates an instance of the container based on the image file. You can generate multiple container instances running at the same time.

5. Why use Docker

Docker has great advantages in the following aspects:

Faster delivery and deployment

Docker can help you achieve fast delivery throughout the development cycle. Docker allows developers to develop in local containers where applications and services are installed. Can be integrated directly into the sustainable development process.

Developers can use a standard image to build a set of development containers, and after development is complete, operators can directly use this container to deploy code. Docker can quickly create containers, quickly iterate over applications, and make the entire process visible, making it easier for other members of the team to understand how the application is created and works. Docker containers are very light and fast! The start-up time of the container is seconds, saving a lot of time in development, testing and deployment.

Efficient deployment and expansion

Docker containers can run on almost any platform, including physical machines, virtual machines, public clouds, private clouds, personal computers, servers, and so on. This compatibility allows users to migrate an application directly from one platform to another.

The compatibility and lightweight features of Docker make it easy to realize dynamic load management. You can quickly expand or easily offline your applications and services, and this speed is close to real-time.

Higher resource utilization

Docker has a high utilization of system resources, and thousands of Docker containers can be run on one host at the same time. In addition to running the application, the container basically does not consume additional system resources, so that the performance of the application is very high, and the cost of the system is as low as possible. It takes 10 virtual machines to run 10 different applications in traditional virtual machine mode, while Docker only needs to start 10 isolated applications.

Easier management

With Docker, you can replace a lot of previous update work with only a small change. All changes are distributed and updated incrementally, resulting in automated and efficient management.

Thank you for reading this article carefully. I hope the article "Why there is Docker" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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