I have a docker image installed and I'd like to check what is its CMD command. Is there any cli command to do so? for example, I'd like it to tell me that this docker image CMD is ["rails","server"]
You can use the docker inspect command
docker inspect
docker inspect --format='{{.Config.Cmd}}' <image:tag> docker inspect -f '{{.Config.Cmd}}' <image:tag>
That is used, for instance, to "list full command of running/stopped container in Docker".
1.4m articles
1.4m replys
5 comments
57.0k users