docker导出导入镜像快照转移机器

导出镜像快照


ubuntu@ubuntu18:/tmp$ docker export test4 > test4.tar
ubuntu@ubuntu18:/tmp$ ls
config-err-X1JlNt                                                             systemd-private-351c5609dd694b98a5ca0e42b1ec52d7-systemd-resolved.service-SAHMlc
snap.docker                                                                   systemd-private-351c5609dd694b98a5ca0e42b1ec52d7-systemd-timesyncd.service-epByy6
ssh-4CudbCufMIfk                                                              test4.tar
systemd-private-351c5609dd694b98a5ca0e42b1ec52d7-bolt.service-ewZ2ld          VMwareDnD

导入镜像快照

ubuntu@ubuntu18:/tmp$ cat test4.tar | docker import - test4:0.1
sha256:ece6e7bf2d448d1adbdc79493d135c77008942532d3891c27dd21fe6a8f6a551
ubuntu@ubuntu18:/tmp$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
test4               0.1                 ece6e7bf2d44        4 seconds ago       64.2MB
flag                0.1                 5822df4da7a2        25 hours ago        64.2MB
myubuntu18          latest              ccc6e87d482b        5 weeks ago         64.2MB
ubuntu              18.04               ccc6e87d482b        5 weeks ago         64.2MB
ubuntu              14.04               6e4f1fe62ff1        2 months ago        197MB
发布了61 篇原创文章 · 获赞 22 · 访问量 4228

猜你喜欢

转载自blog.csdn.net/yiqiushi4748/article/details/104412477