Best practices for using docker in an air-gapped environment

守給你的承諾、 提交于 2019-12-04 23:54:23

问题


I'm new to Docker, and would like to use it in an air-gapped environment. I understand I can set up my own repository inside my isolated system, but I don't know how to get the many docker images I need from the docker hub into the environment. If I could download them to a .zip or .tgz archive, that would be great, but don't see a way to do that from the hub. I can't use Docker outside the isolated environment. I may be able to use git outside my air-gapped environment, but getting .zip archives would be much better. Advice on how to get started will be appreciated.


回答1:


You can do the following to produce an archive file for any image on the Hub:

docker pull image:tag
docker save image:tag -o file.tar

Then transfer file.tar to the air-gapped machine and just do:

docker load -i file.tar

If you actually have an air-gapped network, rather than a single machine, it's probably a better idea to set up your own registry within the network that contains your curated images.



来源:https://stackoverflow.com/questions/30225779/best-practices-for-using-docker-in-an-air-gapped-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!