Get the App
SLTechnology News&Howtos  ›  Servers  › 

What are the key technologies that the underlying implementation of Docker depends on?

Shulou Source: shulou.com Published: 2022-05-31 23:30:21 09月24日 Update

This article will explain in detail what the key technologies for the underlying implementation of Docker depend on. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.

Underlying technology

Docker is written in Go and takes advantage of several Linux kernel features to provide the functionality we see.

Namespace

Docker uses a technology called namespaces to provide isolated workspaces that we call containers. When you run a container, Docker creates a set of namespaces for the container.

This provides an isolation layer: each aspect of the container runs in its own namespace and has no access outside it.

Some of the namespaces used by Docker include:

Pid namespace: for process isolation (pid: process ID).

Network namespace: used to manage network interfaces (network: network).

Ipc namespace: used to manage access to ipc resources (ipc: interprocess communication).

Mnt namespace: used to manage mount points (mnt:mount).

Uts namespace: used to isolate kernel and version identifiers. (UTS:Unix time sharing system).

Control group

Docker also uses another technology called cgroups or control Group. The key to running applications in isolation is to let them use only the resources you want. This ensures that the container is a good multi-tenant citizen on the host. The control group allows Docker to share available hardware resources with the container and set restrictions and constraints as needed. For example, limit the memory available to a specific container.

Federated file system

Union file systems, or UnionFS, are file systems that operate by creating layers, making them very lightweight and fast. Docker uses the union file system to provide building blocks for containers. Docker can use a variety of union file system variants, including AUFS, btrfs, vfs, and DeviceMapper.

Container format

Docker combines these components into wrappers in what we call container formats. The default container format is called libcontainer. Docker also supports traditional Linux containers that use LXC. In the future, Docker may support other container formats, for example, by integrating with BSD prisons or Solaris zones.

On the underlying implementation of Docker depends on what the key technology is shared 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.

Tags: Container space name system technology file isolation format network key underlying resource process management run content kernel article more knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple MariaDB Linux Redmi vpn