简体   繁体   中英

How to find out what a Docker image layer is from its hash?

When starting a Docker image:

$ docker run -it ruby:2.6.1 
Unable to find image 'ruby:2.6.1' locally
2.6.1: Pulling from library/ruby
22dbe790f715: Pull complete 
0250231711a0: Pull complete 
6fba9447437b: Pull complete 
c2b4d327b352: Pull complete 
270e1baa5299: Pull complete 
  ...

Is it possible to tell what image 270e1baa5299 is?

You can start with docker history :

docker history  ruby:2.6.1 

See " Digging into Docker layers " from Jessica G.

That will give you an idea of the content of those layers:

https://miro.medium.com/max/900/1*kTDjPNUqGX8ZdLidbukheA.png

For more: wagoodman/dive

A tool for exploring a docker image, layer contents, and discovering ways to shrink the size of your Docker/OCI image.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM