how to browse docker image without running it?

Viewed 9226

Is there any why to browse a docker image using ssh or equivalent? My motivation is to compare two docker images using beyond compare

edit: i am not interested in just listing file names, I need the content and I would like to be able compare two images, including content of the files.

2 Answers

If what you want is exploring a docker image then you can use a tool named dive.

You cannot directly compare files content but at least you can browse layer contents and see which files have been added/removed/modified/unmodified.

To analyze a Docker image simply run:

dive <your_image>

enter image description here

You might do something like docker image history <your image name here> This will give you the history of how the image is build and you could compare it to another image...

or docker inspect <your image name here>

Related