补充容器迁移方法.
Signed-off-by: ithink.chan <chenyang@autoai.com>
This commit is contained in:
parent
edd1b46621
commit
94a5188599
|
@ -34,13 +34,15 @@ docker ps
|
|||
# 进入正在运行的容器
|
||||
docker exec -it <tag name/id> bash
|
||||
# 提交针对谋容器的修改
|
||||
docker commit <id> <name>:<tag>
|
||||
docker commit <id> <image name>:<tag>
|
||||
# 退出容器
|
||||
exit
|
||||
# 保存镜像以便于迁移
|
||||
# 迁移镜像
|
||||
docker save -o <tar file> <image name/id>
|
||||
# 导入要迁移的镜像
|
||||
docker load -i <tar file>
|
||||
# 迁移容器
|
||||
docker export -o <tar file> <container name/id>
|
||||
docker import <tar file> <image name>:<tag>
|
||||
```
|
||||
|
||||
### 容器操作
|
||||
|
@ -51,9 +53,9 @@ docker container ls -a
|
|||
# 获得容器id
|
||||
docker container ls -a -p
|
||||
# 停止容器
|
||||
docker container stop <container ID>
|
||||
docker container stop <container id>
|
||||
# 删除容器
|
||||
docker container rm <container ID>
|
||||
docker container rm <container id>
|
||||
```
|
||||
|
||||
### 镜像操作
|
||||
|
|
Loading…
Reference in New Issue