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 does docker mean?

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces the meaning of 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.

Introduction to docker

Docker provides an envelope, or container, that can run your application. It was originally an amateur project started by dotCloud and was opened up some time ago. It attracted a lot of attention and discussion, leading dotCloud to rename it to Docker Inc. Originally written in the Go language, it acts as a pipeline added to the LXC (LinuX Containers,linux container), allowing developers to work on higher-level concepts.

Docker extends the Linux container (Linux Containers), or LXC, to provide a lightweight virtual environment for processes through a high-level API. Docker takes advantage of LXC, cgroups and Linux's own kernels. Unlike traditional virtual machines, a Docker container does not contain a separate operating system, but runs based on the functions provided by the operating system in the existing infrastructure.

Docker is similar to the concept of a virtual machine, but differs from virtualization technology in the following:

1. Virtualization technology relies on physical CPU and memory and is hardware-level, while docker is built on the operating system and uses the operating system's containerization technology, so docker can even run on virtual machines.

two。 Virtualized systems generally refer to operating system images, which are complex and called "systems", while docker is open source and lightweight, called "containers". A single container is suitable for deploying a small number of applications, such as deploying a redis or a memcached.

3. Traditional virtualization technology uses snapshots to save state, while docker not only saves the state more easily and cheaply, but also introduces a similar source code control mechanism to record the historical versions of snapshots of the container one by one, and the switching cost is very low.

4. Traditional virtualization technologies are more complex to build systems and require a lot of manpower, while docker can build the entire container through Dockfile, and the restart and build speed is very fast. More importantly, Dockfile can be written manually so that application developers can guide the system environment and dependencies by issuing Dockfile, which is good for continuous delivery.

5.Dockerfile can create a new container based on an already built container image. Dockerfile can be shared and downloaded by the community, which is conducive to the promotion of this technology.

Docker works like a portable container engine. It packages the application and the dependent environment of all programs into a virtual container that can run on any kind of Linux server. This greatly improves the flexibility and portability of programs, whether license is required, in public or private clouds, in bare metal environments, and so on.

Docker is also a cloud computing platform, it uses Linux's LXC, AUFU, Go language, cgroup to achieve resource independence, can easily achieve file, resource, network and other isolation, its ultimate goal is to achieve application isolation similar to PaaS platform.

Docker consists of the following:

1. Docker server daemon (server daemon), which is used to manage all containers.

2. Docker command line client, which is used to control the server daemon.

3. Docker image: find and browse docker container image.

Docker characteristics

File system isolation: each process container runs in a completely separate root file system.

Resource isolation: you can use cgroup to allocate different system resources, such as CPU and memory, to each process container.

Network isolation: each process container runs in its own network namespace with its own virtual interface and IP address.

Copy-on-write: create the root file system with copy-on-write, which makes deployment extremely fast and saves memory and hard disk space.

Logging: Docker will collect and record the standard stream (stdout/stderr/stdin) of each process container for real-time or batch retrieval.

Change management: changes to the container file system can be committed to a new image and reused to create more containers. There is no need to use templates or manual configuration.

The interactive Shell:Docker can assign a virtual terminal and associate it to the standard input of any container, such as running an one-time interactive shell.

Two basic Concepts images and container

Container and Image in the world of Docker, Image refers to a read-only layer (Layer), where the layer is a concept in AUFS

Docker uses a file system called AUFS, this file system allows you to overlay and modify your files layer by layer, the bottom file system is read-only, if you need to modify files, AUFS will add a writable layer (Layer), this has many benefits, such as different Container can share the underlying read-only file system (the same Kernel), so that you can run N multiple Container without your hard disk being crowded! This read-only layer is Image! As you can see, a writable layer is Container.

So what's the difference between Image and Container? Quite simply, the only difference between them is that one is a read-only layer and the other is a writable layer. You can use the docker commit command to change your Container into an Image, that is, to submit changes to the Container you are running into a new read-only Image, which is very similar to the git commit command.

Thank you for reading this article carefully. I hope the article "what is the meaning of docker" shared by the editor will be helpful to everyone? at the same time, I also hope that you will support and pay attention to the industry information channel, and 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