Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practices for using docker in an air-gapped environment

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.

like image 424
Dave Avatar asked May 13 '15 21:05

Dave


People also ask

Can you use Docker as a development environment?

Docker is a great way to provide consistent development environments. It will allow us to run each of our services and UI in a container. We'll also set up things so that we can develop locally and start our dependencies with one docker command.


1 Answers

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.

like image 108
Adrian Mouat Avatar answered Sep 30 '22 20:09

Adrian Mouat