首页 > 代码库 > Docker的镜像迁移
Docker的镜像迁移
[root@localhost ~]# mkdir /opt/soft/
[root@localhost ~]# docker save c3987965c15d > /opt/soft/postgres.img
[root@localhost ~]# cd /opt/soft
[root@localhost soft]# ls
postgres.img
[root@localhost soft]# sz postgres.img
[root@localhost2 ~]# rz
[root@localhost2 ~]# docker load < postgres.img
[root@localhost2 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> c3987965c15d 3 months ago 196.5 MB
[root@localhost2 ~]# docker tag c3987965c15d centos:1
[root@localhost2 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
centos 1 c3987965c15d 3 months ago 196.5 MB
Docker的镜像迁移