现在是
加载中...
加载中...

导出Docker容器到本地

docker export docker-centos > centos-with-dev-env.tar

导入容器到本地镜像

cat centos-with-dev-env.tar | docker import - centos-with-dev-env:1.0.0

从网路导入容器到本地镜像

docker import url res:tag

or

PS C:\Users\Terwer\desktop> docker ps -a
CONTAINER ID        IMAGE               COMMAND                 CREATED             STATUS                        PORTS                                                                                                                                                  NAMES
610d84f37881        terwer/centos:7     "bash /entrypoint.sh"   8 hours ago         Exited (255) 14 minutes ago   0.0.0.0:3000-3001->3000-3001/tcp, 0.0.0.0:5901->5901/tcp, 0.0.0.0:8080-8081->8080-8081/tcp, 0.0.0.0:8090-8091->8090-8091/tcp, 0.0.0.0:9090->9090/tcp   docker-centos
PS C:\Users\Terwer\desktop> docker commit 610d84f37881 terwer/centos-with-dev-env:1.0.0

作者:Terwer

首发:远方的灯塔

原创内容,转载请注明出处!

文章目录

目录加载中...