This commit is contained in:
khs1994
2017-11-22 11:22:57 +08:00
parent 7cbdf27d93
commit ef3e10ccb4
6 changed files with 22 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
##后台(background)运行
## 后台(background)运行
更多的时候,需要让 Docker 在后台运行而不是直接把执行命令的结果输出在当前宿主机下。此时,可以通过添加 `-d` 参数来实现。

View File

@@ -1,6 +1,6 @@
##导出和导入容器
## 导出和导入容器
###导出容器
### 导出容器
如果要导出本地某个容器,可以使用 `docker export` 命令。
```bash
$ docker ps -a
@@ -10,7 +10,7 @@ $ docker export 7691a814370e > ubuntu.tar
```
这样将导出容器快照到本地文件。
###导入容器快照
### 导入容器快照
可以使用 `docker import` 从容器快照文件中再导入为镜像,例如
```bash
$ cat ubuntu.tar | docker import - test/ubuntu:v1.0