How to Use Waler to Inspect Your Docker Image?

A Docker image consists of a series of layers normally represented by the instructions in a Dockerfile that was used to build the image.

If you have a docker image, inspecting the image layer would provide additional information in terms of the base layers the image is built from, and the commands that were used to make the docker image, and sometimes even expose sensitive information that accidentally or unknowingly became a part of the image.

When you run Whale imagename, if the imagename is not present locally, then dive would try and pull the imagename from docker hub for inspection.

Installing whaler

Let’s download and install whaler.

wget -O /usr/local/bin/whaler https://github.com/P3GLEG/Whaler/releases/download/1.0/Whaler_linux_amd64

chmod +x /usr/local/bin/whaler

Check if whaler command is installed in our system.

whaler --help

Usage of whaler:
-f string
File containing images to analyze seperated by line
-filter
Filters filenames that create noise such as node_modules. Check ignore.go file for more details (default true)
-sV string
Set the docker client ID to a specific version -sV=1.36
-v Print all details about the image
-x Save layers to current directory

Inspecting image layers with whaler?

whaler <image name>

--

--

THE HOW TO BLOG |Siddhanth Dwivedi

Siddhanth Dwivedi | Senior Security Engineer & AWS Community Builder 👨🏾‍💻