See full command of running/stopped container in Docker

前端 未结 6 1446
傲寒
傲寒 2020-12-02 03:51

How can I see the full command of a running container/process in Docker?

$ docker ps --all
CONTAINER ID    IMAGE          COMMAND                 CREATED             


        
6条回答
  •  执笔经年
    2020-12-02 04:46

    Moving Dylan's comment into a full-blown answer because TOO USEFUL:

    docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike YOUR-CONTAINER
    

    What does it do? Runs https://github.com/lavie/runlike inside a container, gets you the complete docker run command, then removes the container for you.

提交回复
热议问题