如何在不使用存储库的情况下将Docker映像从一台主机复制到另一台主机

Deadly 提交于 2020-08-14 07:09:50

问题:

How do I transfer a Docker image from one machine to another one without using a repository, no matter private or public? 如何在不使用存储库的情况下将Docker映像从一台计算机转移到另一台计算机,无论是私有的还是公共的?

I am used to play and create my own image in VirtualBox, and when it is finished, I try to deploy to other machines to have real usage. 我习惯于在VirtualBox中播放和创建自己的映像,完成后,我尝试部署到其他计算机上以实际使用。

Since it is based on own based image (like Red Hat Linux), it cannot be recreated from a Dockerfile. 由于它基于自己的映像(例如Red Hat Linux),因此无法从Dockerfile重新创建。

Are there simple commands I can use? 我可以使用简单的命令吗? Or another solution? 还是其他解决方案?

It seems save/export can achieve a similar purpose, see What is the difference between save and export in Docker? 看来保存/导出可以达到类似的目的,请参阅Docker中保存和导出之间有什么区别? , and I prefer the save command for my case. ,对于我的情况,我更喜欢使用save命令。


解决方案:

参考一: https://stackoom.com/question/1cQcf/如何在不使用存储库的情况下将Docker映像从一台主机复制到另一台主机
参考二: https://oldbug.net/q/1cQcf/How-to-copy-Docker-images-from-one-host-to-another-without-using-a-repository
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!