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

Examples of directory storage of Docker images

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

Share

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

This article mainly introduces "directory storage examples of Docker images". In daily operation, I believe that many people have doubts about directory storage examples of Docker images. The editor has consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "directory storage examples of Docker images". Next, please follow the editor to study!

After we have successfully installed docker, execute the command line sudo docker run hello-world. If this is the first time, we will remotely pull the image of hello-world to the local, and then run it to display hello world.

Take the ubuntu system as an example, the local image is stored in the directory / var/lib/docker folder:

The relevant catalogs are described below.

/ var/lib/docker/image/overlay2: the directory where the mirror management data is stored, named after the storage driver used. On my ubuntu system, the driver used is overlay2.

The repositories.json file is equivalent to manifest.json in SAP UI5 and project.json in nodejs project:

/ var/lib/docker/image/overlay2/distribution$: mirror-related metadata pulled from the remote end to the local

/ var/lib/docker/image/overlay2/imagedb: mirror database

/ var/lib/docker/image/overlay2/imagedb/content:

Configure digest for each mirror level, that is, mirror ID. You can see a sha256 subfolder in the content folder.

When you enter the subfolder, you will see a file named after the mirror ID, from which the first 12 bits of the mirror ID we see with the command line docker images come from.

/ var/lib/docker/image/overlay2/layerdb: mirror the metadata of each layer.

When you enter sha256, you will see the chain ID of layer:

Content in chain ID:

Explanation of directory storage of Docker image

At this point, the study of "directory storage examples of Docker images" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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