Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show tree only for a specific image #43

Open
omerlh opened this issue Aug 5, 2018 · 9 comments
Open

Show tree only for a specific image #43

omerlh opened this issue Aug 5, 2018 · 9 comments

Comments

@omerlh
Copy link

omerlh commented Aug 5, 2018

First, thanks - this is a really nice tool :)
Instead of showing the tree for all the images, I want to show the tree only for a specific image - is that something that is supported?

@omerlh
Copy link
Author

omerlh commented Aug 5, 2018

Found it: dockviz images microsoft/dotnet:2.1-aspnetcore-runtime -t.

@omerlh omerlh closed this as completed Aug 5, 2018
@omerlh omerlh reopened this Aug 5, 2018
@omerlh
Copy link
Author

omerlh commented Aug 5, 2018

Sorry for the mess, this is not what I wanted - this show all images based on this image, I want the opposite behavior - all the children of this image.

@justone
Copy link
Owner

justone commented Aug 5, 2018

No worries.

Can you show me some example output so I can see what you mean?

@omerlh
Copy link
Author

omerlh commented Aug 5, 2018

This is the output of docker inspect:

OmerL-Mac:api omerl$ docker inspect local/api:1 -f "{{.RootFS.Layers}}"
[sha256:cdb3f9544e4c61d45da1ea44f7d92386639a052c620d1550376f22f5b46981af sha256:3cf68b57ae879122a4c012a92d4948e7a3e64c48a0d09ee0cfbcbf5742367837 sha256:324d9a4273a97e634a3bda9490cd77689c5549f5bd512f40c853b047f7e814d6 sha256:9f652cc2dda0dedd64b65868fca54329b4794f60cb808669d26b079d6d94619c sha256:0636369cabe0f083672fad3295d3c0092c1252c53cb1a72f59c46881444b6216 sha256:588e6933c934fc4b9c34a2543bd86a0162d53eff10adf4aa5efe42ab233ac436 sha256:36ceea3b65f51467a8723dc6ec0abeaa809e89ca1e8d0b7a484d064cc6eaf17e]

I want to visualize this tree - starting from my local image up to the first image.
Also - Is there a way to fetch image names even if it's not on my machine?

@justone
Copy link
Owner

justone commented Aug 6, 2018

So, given this tree of images:

└─735f80812f90 Virtual Size: 83.5 MB Tags: ubuntu:latest
  └─290405e733b3 Virtual Size: 218.1 MB
    └─888dd32677de Virtual Size: 218.1 MB Tags: test:first
      └─69029a86ab24 Virtual Size: 220.6 MB
        └─6afb04494dd1 Virtual Size: 220.6 MB Tags: test:second

When you run dockviz images -t test:first, you get this:

└─888dd32677de Virtual Size: 218.1 MB Tags: test:first
  └─69029a86ab24 Virtual Size: 220.6 MB
    └─6afb04494dd1 Virtual Size: 220.6 MB Tags: test:second

What I think you're asking for is something that will show this:

└─735f80812f90 Virtual Size: 83.5 MB Tags: ubuntu:latest
  └─290405e733b3 Virtual Size: 218.1 MB
    └─888dd32677de Virtual Size: 218.1 MB Tags: test:first

Is that correct?

@omerlh
Copy link
Author

omerlh commented Aug 6, 2018

yep that correct.

@justone
Copy link
Owner

justone commented Aug 6, 2018

Ah. So you'd like to see the ancestry for a particular image. Could you use docker history [imageid] instead?

And to answer your other question (Is there a way to fetch image names even if it's not on my machine?). No, you can't fetch the other names. This is a limitation that Docker imposes.

@omerlh
Copy link
Author

omerlh commented Aug 6, 2018

Thanks. Currently I do using docker-history, just thought visualization could be nice :)

@nunofernandes
Copy link

Yep.. having visualization of a specific image and the ancestry would be awsome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants