What is the difference between Docker containers and images?

Guanhui
Release: 2020-06-11 15:49:04
Original
2436 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!