Search notes:

Viewing the content of a docker image

Save image as tar file

With docker save, the content of an image can be saved to a tar archive which allows to inspect the content of the image.
$ docker save $IMGNAME -o /tmp/$IMGNAME.tar
$ tar xf /tmp/$IMGNAME.tar …

dive

dive is a tool for exploring docker images and layer contents.
I was able to install dive in a Debian with
$ DIVE_VERSION=$(curl -sL "https://api.github.com/repos/wagoodman/dive/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
$ curl -OL https://github.com/wagoodman/dive/releases/download/v${DIVE_VERSION}/dive_${DIVE_VERSION}_linux_amd64.deb
$ sudo apt install ./dive_${DIVE_VERSION}_linux_amd64.deb

Index