我 pull 下来了一个阿里云的 docker lnmp 镜像 在我的个人电脑上 连续运行了两天之后 docker stop 掉了 然后再 docker ps -l 咋看不到了呢 还好停止之前以前把容器里网站迁出来了 一般不是 docker stop 之后能在 docker ps -l 里还能看到并继续运行吗 这是什么情况??
1
cuiweiqiang 2016-05-07 16:36:36 +08:00 via iPhone
docker ps -a
|
2
YUX 2016-05-07 16:38:59 +08:00
|
3
niuoh OP @cuiweiqiang 看到了 docker ps -l 和-a 的区别是啥 还有-a 下有好多啊 我怎么清空?
|
4
niuoh OP @cuiweiqiang 找到了 docker rm -f $(docker ps -a -q)这条命令来清空所有容器
|
5
derek80 2016-05-07 17:18:55 +08:00
|
6
zdkmygod 2016-05-07 18:39:46 +08:00
@niuoh
$ docker ps --help Usage: docker ps [OPTIONS] List containers -a, --all=false Show all containers (default shows just running) --before= Show only container created before Id or Name -f, --filter=[] Filter output based on conditions provided --format= Pretty-print containers using a Go template --help=false Print usage -l, --latest=false Show the latest created container, include non-running -n=-1 Show n last created containers, include non-running --no-trunc=false Don't truncate output -q, --quiet=false Only display numeric IDs -s, --size=false Display total file sizes --since= Show created since Id or Name, include non-running |