`dive` – A tool for exploring a Docker Image, Layer Contents, and discovering ways to shrink the size of your Docker/OCI Image

You can use dive to help you optimize your Docker image layers.

Say you have these two layers in your Dockerfile:

RUN wget http://xcal1.vodafone.co.uk/10MB.zip -P /tmp
RUN rm /tmp/10MB.zip

Then you’ll end up with 10MB of wasted space. dive will tell you, so that you can combine these into one optimized layer:

RUN wget http://xcal1.vodafone.co.uk/10MB.zip -P /tmp && rm /tmp/10MB.zip

You can also integrate it as a build step in your CI/CD pipeline, and make it break the build in case you don’t meet a certain quotum.

Installation per Homebrew:

brew install dive

dive →

🔗 Related: In How to build smaller Docker images you can find some practical tips to keep your docker image size under control.

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.