ArturSkowronski
ArturSkowronski

Reputation: 1792

Docker Images Hierarchy

I would like to check what image is a parent of my given Docker image (FROM with image layer it was created). How can I retrieve this information?

I tried do that through

docker images -t

but this flag is deprecated in new Docker versions. Is there any reliable source of such an info?

Upvotes: 9

Views: 7123

Answers (2)

user2915097
user2915097

Reputation: 32196

Use dockerfile-from-image from https://github.com/CenturyLinkLabs/dockerfile-from-image, it will create a Dockerfile, which first line will be FROM xxx

Upvotes: 0

VonC
VonC

Reputation: 1327784

docker tree was deprecated before any good replacement was proposed (see the debate in PR 5001)

This is currently externalized to justone/dockviz.

 alias dockviz="docker run --rm -v /var/run/docker.sock:/var/run/docker.sock nate/dockviz"

Image info is visualized with lines indicating parent images:

dockviz images -d | dot -Tpng -o images.png

as a tree in the terminal:

$ dockviz images -t
└─511136ea3c5a Virtual Size: 0.0 B
  |─f10ebce2c0e1 Virtual Size: 103.7 MB
  | └─82cdea7ab5b5 Virtual Size: 103.9 MB
  ...

Upvotes: 21

Related Questions