Is there a way to tell shell commands are available in a docker image?

I’m using the node docker images as a container for my build pipelines.

An issue I frequently run into is that a binary that I expect to exist, doesn’t and I have to wait for it fail in the build pipeline. The zip command is one such example.

I can run the docker image on my local machine and ssh in to test commands.

Is there a way to summarise what commands are available for a given image?

>Solution :

Is there a way to summarise what commands are available for a given image?

You could look at the contents of /bin:

$ docker run --rm -it --entrypoint=ls node /bin

or /usr/local/bin:

$ docker run --rm -it --entrypoint=ls node /usr/local/bin

etc…

Leave a Reply