Home  >  Article  >  Operation and Maintenance  >  What is the difference between Docker containers and images?

What is the difference between Docker containers and images?

Guanhui
GuanhuiOriginal
2020-06-11 15:49:042514browse

What is the difference between Docker containers and images?

#What is the difference between Docker containers and images?

The image is composed of layers of read-only layers stacked together, while the Docker container is composed of the read-only layer and the read-write layer of the image. The only difference between the two is that the Docker container The top layer is readable and writable.

Image

Image is the unified perspective of a bunch of read-only layers, maybe this The definition is a bit difficult to understand. The following picture can help readers understand the definition of mirroring.

What is the difference between Docker containers and images?

From the left we see multiple read-only layers, which overlap. Except for the bottom layer, all other layers will have a pointer pointing to the next layer. These layers are implementation details inside Docker and can be accessed on the file system of the host (Translator's Note: the machine running Docker). Union file system technology can integrate different layers into one file system, providing a unified perspective for these layers, thus hiding the existence of multiple layers. From the user's perspective, only one file exists system. We can see what this perspective looks like on the right side of the image.

Recommended tutorial: "Docker"

The above is the detailed content of What is the difference between Docker containers and images?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is Docker core?Next article:What is Docker core?