请参阅Docker中运行/停止的容器的完整命令 [英] See full command of running/stopped container in Docker

查看:168
本文介绍了请参阅Docker中运行/停止的容器的完整命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

pre $ $ docker ps --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5b6291859b61 nginx:1.7.8nginx -g'daemon 4分钟前退出(0)4分钟前thirsty_brattain

我只能看到nginx -g守护进程..这里,而不是完整的命令。

解决方案

使用:

  docker inspect -f{{.Name} } {{.Config.Cmd}}$(docker ps -a -q)

它对所有容器进行码头检查。


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

$ docker ps --all
CONTAINER ID        IMAGE                 COMMAND                CREATED             STATUS                     PORTS               NAMES
5b6291859b61        nginx:1.7.8           "nginx -g 'daemon of   4 minutes ago       Exited (0) 4 minutes ago                       thirsty_brattain 

I can only see "nginx -g 'daemon of".. here, not the full command.

解决方案

use:

docker inspect  -f "{{.Name}} {{.Config.Cmd}}" $(docker ps -a -q)

... it does a "docker inspect" for all containers.

这篇关于请参阅Docker中运行/停止的容器的完整命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆