Recently I was in a problem with setting up an application to another machine, which was perfectly okay on my machine. It was a Laravel application using docker.
So when I tried to run that app on other machine I was receiving connection refused from registry server because that app database image was hosted on a server and to access it I had to install VPN and other certificates.
docker-compose up --build
It was responding me:
Pulling database (registry.phpfarmer.com:5000/development/phpfarmer_database:latest)... ERROR: Get https://registry.phpfarmer.com:5000/v2/: dial tcp 10.16.64.80:5000: connect: connection refused
After doing some debugging and checking VPN, I found that server was down for new infrastructure implementation. So how I moved forward without making that server up again.
Yes, what I did was something like, saving my local image to a tar file and import that file in docker on other machine. Steps was mostly three line like:
docker image ls #find the image name from the list docker save phpfarmer_database > phpfarmer_database.tar #store it docker load < phpfarmer_database.tar #import it on new machine
After that, when I run again
docker-compose up --build
It was all fine, application started on new machine. So in summary, If you have the local copy of any docker image, you can bypass registry of it and copy it on other machine to install your app.
For more:
https://docs.docker.com/engine/reference/commandline/save/
https://docs.docker.com/engine/reference/commandline/load/