nonopolarity
nonopolarity

Reputation: 150956

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?

Upvotes: 3

Views: 3392

Answers (1)

VonC
VonC

Reputation: 1323075

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.

Upvotes: 2

Related Questions