how to browse docker image without running it? [duplicate]
Asked Answered
C

2

7

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.

Candytuft answered 10/11, 2018 at 21:14 Comment(3)
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.Teetotaler
this is not duplicate. looks like who ever marked duplicate did not pay attention on "without running" part.Liveried
One solution: #66141891Liveried
S
14

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

Seminole answered 30/12, 2019 at 9:20 Comment(0)
S
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>

Scuttle answered 10/11, 2018 at 22:29 Comment(1)
Not what I expected to find, but docker inspect <name> actually was useful to debug entrypoint. Thanks!Trimester

© 2022 - 2024 — McMap. All rights reserved.