We're very pleased that you want to get in touch with us. Please fill in the form below:



or   Close this form  
Some content

Peter Pilgrim :: Java Champion :: Digital Developer Architect

I design Java EE and Scala software solutions for the blue-chip clients and private sector

Hey all! Thanks for visiting. I provide fringe benefits to interested readers: checkout consultancy, training or mentorship Please make enquiries by email or call +44 (0)7397 067 658.

Due to the Off-Payroll Working plan for the UK government, unfortunately, I am no longer accepting standard GOV.UK contract engagements for the public sector. Please enquire for further information.

Docker Images Tree Visualisation

07 August 2017 Comments off

2 minutes

310

Docker Post

On recent Docker release, you might be surprised that the tree view no longer works as expected:

$ docker images --tree

The above command would produce a visual dump of the images inside the container. The command generated a hierarchy of the images, showing the relationship between parent and children. However, this command has been dropped since Docker version 1.6. So what do you do?

You can use the custom document plugin images, DockViz from JustOne of Github (https://github.com/justone/dockviz).

The simplest way is start up the docker image and login as a Bash user. Upgrade yourself to root superuser and then launch the following command:

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

Now execute the alias:

$ docker dataviz -t

This command downloads the DockViz image then executes Docker API using the protocol, obviously over the named UNIX socket. The result is a hierarchy tree of the images in your container, very similarly to “docker images -t”

If you have trouble getting access to /var/run/docker.sock even as “root” superuser. Try the following by adding the –privileged flag to the alias command. Run the following command:

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

My final tip is add the “alias” to the login script for the superuser. Here is the command for that:

$ echo 'alias dockviz="docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock nate/dockviz"' > ~/.bash_profile

This is because RHEL, CentOS and SE Linux restrict access to the docker socket even for superusers. Channeling “SECURITAH!” @SwiftOfSecurity 😉

+PP+
June 2017

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Contents of this blog entry are under copyright © 2017 by Peter Pilgrim and associates. For enquiries after republishing, please contact us for permission. All requests for syndicated content will be ignored /dev/null, consider yourself warned!

I help to design, create and build JVM components and services that are behind popular e-commerce websites.

My Blurb

Please get in touch , directly, to establish hire availability, contract & consulting opportunities.

Speaking at Your Conference

Contact by invitation

What Peter Does

Contact