Dive - Into docker images
Docker Image Layers
Usually when a developer looks into docker images docker image history
Reducing image size is a common problem which is faced while building docker image and to overcome this problem we follow best practices like using multi stage build , using smaller base image, use && with RUN command to reduce number of layers.
DIVE is a tool which help in analysis of Image layers, Potential wasted Image, Image efficiency score. It help visualise each image layer and files added and modified in each layer.
It is supported on Windows, MacOs and Linux.
Various option of DIVE usage:
DIVE can also be integrated with CI tool to check if image passes highestUserWastedPercent (highest allowable percentage of bytes wasted), highestWastedBytes(highest allowable bytes wasted) and lowestEfficiency(lowest allowable image efficiency). If these criteria does not meet the expectation docker push to Docker Image repository will fail.
Integration will fail incase docker image does not meet the specified criteria.
DIVE can also be optimsed by placing .dive.yaml file in home directory.