docker stop命令无法正常工作

时间:2016-03-04 12:04:22

标签: docker

docker stop命令的真正目的是什么?!!系统重启后,我试图停止所有的docker容器,它没有说错误。但是,我再次看到所有容器!见这个输出

mahmood@orca:~$ docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                      PORTS               NAMES
a95c13863461        780bd4494e2f        "/bin/sh -c 'apt-get "   20 hours ago        Exited (137) 20 hours ago                       pensive_banach
54a3b132af8c        3d4b41a3842f        "/bin/sh -c ''/root/s"   22 hours ago        Exited (137) 21 hours ago                       master
ea413e092330        1049eef389d5        "/entrypoint.sh -t 4 "   8 days ago          Created                                         dc-server
03917ffb3f44        edac12b8dc40        "/bin/sh -c 'cd $MAHO"   8 days ago          Exited (137) 8 days ago                         sick_snyder
b64958d95615        aaea9c6a8dc9        "/bin/sh -c 'cd $MAHO"   9 days ago          Exited (1) 9 days ago                           compassionate_turing
8ad0f235a48b        4a793e47ece4        "/bin/bash"              9 days ago          Created                                         data
mahmood@orca:~$ docker stop a95c13863461 54a3b132af8c ea413e092330 03917ffb3f44 b64958d95615 8ad0f235a48b
a95c13863461
54a3b132af8c
ea413e092330
03917ffb3f44
b64958d95615
8ad0f235a48b
mahmood@orca:~$ docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                      PORTS               NAMES
a95c13863461        780bd4494e2f        "/bin/sh -c 'apt-get "   20 hours ago        Exited (137) 20 hours ago                       pensive_banach
54a3b132af8c        3d4b41a3842f        "/bin/sh -c ''/root/s"   22 hours ago        Exited (137) 21 hours ago                       master
ea413e092330        1049eef389d5        "/entrypoint.sh -t 4 "   8 days ago          Created                                         dc-server
03917ffb3f44        edac12b8dc40        "/bin/sh -c 'cd $MAHO"   8 days ago          Exited (137) 8 days ago                         sick_snyder
b64958d95615        aaea9c6a8dc9        "/bin/sh -c 'cd $MAHO"   9 days ago          Exited (1) 9 days ago                           compassionate_turing
8ad0f235a48b        4a793e47ece4        "/bin/bash"              9 days ago          Created                                         data
mahmood@orca:~$ 

1 个答案:

答案 0 :(得分:3)

根据文件:

  

-a, - all显示所有容器(默认显示刚刚运行)

您正在查看所有容器(已停止且处于活动状态),请键入docker ps以仅查看有效容器。