How to view files inside docker image without running it?

Viewed 3208

Sometimes running the docker image fails so ssh’ing into the container is not an option. in that cases how do we see the content inside container?

There is a existing question but mistakenly marked as duplicate. how to browse docker image without running it?

1 Answers

Answering my own question.

you can add something like to override the entry point in the Dockerfile and run ls or cat command to see inside.

ENTRYPOINT ls /etc/fluentd
Related