rewrite the container, network chapters

This commit is contained in:
Baohua Yang
2014-09-15 22:30:23 +08:00
parent da60ad7b47
commit 64a0f39dff
14 changed files with 164 additions and 143 deletions

View File

@@ -3,3 +3,15 @@
此外当Docker容器中指定的应用终结时容器也自动终止。
例如对于上一章节中只启动了一个终端的容器,用户通过`exit`命令或`Ctrl+d`来退出终端时,所创建的容器立刻终止。
终止状态的容器可以用`docker ps -a`命令看到。例如
```
sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ba267838cc1b ubuntu:14.04 "/bin/bash" 30 minutes ago Exited (0) About a minute ago trusting_newton
98e5efa7d997 training/webapp:latest "python app.py" About an hour ago Exited (0) 34 minutes ago backstabbing_pike
```
处于终止状态的容器,可以通过`docker start`命令来重新启动。
此外,`docker restart`命令会将一个运行态的容器终止,然后再重新启动它。