Optimize your docker images

Sat 28 Mar 2020

Some docker images can get quite large. We need to optimize our docker images. This can take a lot of time. I've found a fantastic tool that allows you to inspect each layer in the history of an image. The tool shows the command that created the layer, the size and the files that were added during the build of it.

Dive makes this easy! Here is a gif that is also featured on their Github README that shows why this tool will make optimizing your images easy.

Dive gif that shows functionality

Normally I would trial and error commands in an alpine session. It would manually check the difference and optimize my images like that. Using docker history to see if the layers reduced in size. However, with Dive this task took me a fraction of the time.

I recommend to check out this tool. It gives a powerful GUI to an already powerful platform.