How do I transfer a Docker image from one machine to another one without using a repository, no matter private or public?
I create my own image in VirtualBox, and wh
All other answers are very helpful. I just went through the same problem and figure out an easy way with docker machine scp
.
Since Docker Machine v0.3.0, scp was introduced to copy files from one Docker machine to another. This is very convenient if you want copying a file from your local computer to a remote Docker machine such as AWS EC2 or Digital Ocean because Docker Machine is taking care of SSH credentials for you.
Save you images using docker save
like:
docker save -o docker-images.tar app-web
Copy images using docker-machine scp
docker-machine scp ./docker-images.tar remote-machine:/home/ubuntu
Assume your remote Docker machine is remote-machine
and the directory you want the tar file to be is /home/ubuntu
.
Load the Docker image
docker-machine ssh remote-machine sudo docker load -i docker-images.tar