Dive Into Docker Image Layers

I recently used a tool named dive to explore docker images developed and maintained by teammates or opensourced docker images. I used to look into Dockerfile steps to explore image layes. dive brings cli-ui and using arrow and tab keys we can explore each layer in left pane while layer contents listed in right pane.

Essentially dive based on docker api and its cache contents and provides commands to explore layer contents and minimize the size of images.

Installation

brew install dive

command to explore a image layers

dive <docker-image-id>

to build a image using dive command

dive build -t <image-tag> .