Ajeet Raina Docker Captain, ARM Innovator & Docker Bangalore Community Leader.

Pick of the Week: The “dive” Docker Hub Image

1 min read

Are you looking out for a tool that lets you explore a Docker image, see its layer contents, and discover a way to shrink your image size? Check out the Dive tool. 

With over 500k+ Docker Pulls and 33.1K GitHub downloads, Dive is a tool built by Alex Goodman. It is used for analyzing Docker image. It lets you view the contents of Docker images, and discovering ways to shrink the size of your Docker/OCI image.

Features:

  • Show Docker image contents broken down by layer
  • Indicate what’s changed in each layer
  • Estimate “image efficiency”
  • Quick build/analysis cycles
  • CI Integration
  • Multiple Image Sources and Container Engines Supported

Getting Started:

You can run dive directly on MacOS by using the homebrew:

brew install dive

Run the below command to run dive against the logs explorer extension:

dive docker/logs-explorer-extension:0.2.0

 

Press the “Tab” key to switch between the sections. You can view the current Docker image Layer details.

 

 

KeyBindings Cheatsheet:

Below is the list of shortcuts that might be useful:

Key Binding Description
Ctrl + C Exit
Tab Switch between the layer and filetree views
Ctrl + F Filter files
PageUp Scroll up a page
PageDown Scroll down a page
Ctrl + A Layer view: see aggregated image modifications
Ctrl + L Layer view: see current layer modifications
Space Filetree view: collapse/uncollapse a directory
Ctrl + Space Filetree view: collapse/uncollapse all directories
Ctrl + A Filetree view: show/hide added files
Ctrl + R Filetree view: show/hide removed files
Ctrl + M Filetree view: show/hide modified files
Ctrl + U Filetree view: show/hide unmodified files
Ctrl + B Filetree view: show/hide file attributes
PageUp Filetree view: scroll up a page
PageDown Filetree view: scroll down a page

 

Running dive using Docker container on Arm Platform

If you try to run wagoodman/dive:latest on your Apple Mac M1 Pro, then it mightn’t work as there is no support for Arm architecture. Instead, I suggest you to use jauderho/dive image.

docker run –rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
jauderho/dive:latest dive ajeetraina/webpage

 

Resources:

Have Queries? Join https://launchpass.com/collabnix

Ajeet Raina Docker Captain, ARM Innovator & Docker Bangalore Community Leader.

37 Replies to “Pick of the Week: The “dive” Docker Hub Image”

  1. Wow! This could be one particular of the most useful blogs We’ve ever arrive across on this subject. Basically Wonderful. I’m also a specialist in this topic so I can understand your effort.

  2. I wish to voice my admiration for your generosity supporting men who need help on in this theme. Your very own commitment to getting the solution around had become astonishingly effective and has all the time allowed most people much like me to achieve their aims. Your own informative help signifies much to me and extremely more to my fellow workers. Many thanks; from everyone of us.

  3. I just like the valuable information you provide to your articles. I will bookmark your blog and take a look at again right here regularly. I’m quite sure I’ll learn many new stuff right here! Best of luck for the next!

  4. Undeniably believe that which you stated. Your favorite justification appeared to be on the net the simplest thing to be aware of. I say to you, I definitely get irked while people consider worries that they plainly do not know about. You managed to hit the nail upon the top and also defined out the whole thing without having side effect , people could take a signal. Will probably be back to get more. Thanks

  5. Excellent read, I just passed this onto a colleague who was doing a little research on that. And he actually bought me lunch since I found it for him smile So let me rephrase that: Thanks for lunch!

  6. Hello there, I found your website via Google while looking for a related topic, your site came up, it looks good. I have bookmarked it in my google bookmarks.

  7. I know this if off topic but I’m looking into starting my own blog and was curious what all is needed to get setup? I’m assuming having a blog like yours would cost a pretty penny? I’m not very web smart so I’m not 100 certain. Any tips or advice would be greatly appreciated. Appreciate it

  8. I was very pleased to find this web-site.I wanted to thanks for your time for this wonderful read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you blog post.

  9. of course like your web-site but you have to check the spelling on several of your posts. Several of them are rife with spelling problems and I to find it very troublesome to inform the truth nevertheless I will certainly come again again.

  10. I haven?¦t checked in here for some time since I thought it was getting boring, but the last several posts are good quality so I guess I?¦ll add you back to my daily bloglist. You deserve it my friend 🙂

  11. I like the helpful info you supply in your articles. I’ll bookmark your weblog and take a look at once more right here frequently. I am somewhat sure I will be informed many new stuff right right here! Good luck for the following!

Leave a Reply

Your email address will not be published.