9

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.

3
  • 5
    I don't think this is a duplicate, since this question specifically asks how to view image content "without running it". The linked question has answers that touch on that, but it is not the main discussion. Commented Nov 26, 2020 at 10:51
  • 2
    this is not duplicate. looks like who ever marked duplicate did not pay attention on "without running" part. Commented Feb 10, 2021 at 17:01
  • One solution: stackoverflow.com/questions/66141391/… Commented Feb 10, 2021 at 17:02

2 Answers 2

15

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

Sign up to request clarification or add additional context in comments.

Comments

3

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>

1 Comment

Not what I expected to find, but docker inspect <name> actually was useful to debug entrypoint. Thanks!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.