DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • How To Use the Node Docker Official Image
  • Using Environment Variable With Angular
  • Docker Commands Beginners Should Know
  • How to Integrate a Distributed Database With Event Streaming

Trending

  • Metrics at a Glance for Production Clusters
  • Manual Sharding in PostgreSQL: A Step-by-Step Implementation Guide
  • Endpoint Security Controls: Designing a Secure Endpoint Architecture, Part 2
  • MySQL to PostgreSQL Database Migration: A Practical Case Study
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Docker Images Tree Visualization

Docker Images Tree Visualization

See how you can still get a hierarchy tree visualization of the images in your container after the most recent Docker release.

By 
Peter Pilgrim user avatar
Peter Pilgrim
·
Aug. 08, 17 · Tutorial
Likes (5)
Comment
Save
Tweet
Share
19.7K Views

Join the DZone community and get the full member experience.

Join For Free

In the 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.

The simplest way is to start up the Docker image and log in 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 ��

Docker (software) Tree (data structure) Command (computing) Visualization (graphics)

Published at DZone with permission of Peter Pilgrim, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • How To Use the Node Docker Official Image
  • Using Environment Variable With Angular
  • Docker Commands Beginners Should Know
  • How to Integrate a Distributed Database With Event Streaming

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: