

It will then create an SSH tunnel from the localhost. It will help you to set up a private Docker registry which is temporary on the host server. You have another command-line utility called docker-push-ssh. $ docker save : | gzip | docker load Method 5. You will need the SSH credentials and both the users on the local and remote machines should be in the Docker group. You can also use the DOCKER_HOST variable to copy images from one host to another. Copying Images Using DOCKER_HOST variable $ docker $(docker-machine config machine1) save | docker $(docker-machine config machine2) load Method 4. If you have two Docker machines - machine1 and machine2, you can copy the images using the following command. Copying Docker Images using Docker Machines If you want to check how the transfer is taking place, you can use the pv through the pipe. The command to do so is - $ docker save | bzip2 | \ You can also transfer your Docker images through SSH and bzip the content to compress it on the fly. Next, you can use the Docker load command to restore the image from this tar file. You can then copy this tar file using simple tools such as cp, rsync, scp, etc. The commands to do so are - $ docker save -o You can then use the Docker load command in another machine to load the Docker image back from the tar file. This will also compress the entire image and will allow you to share them easily and quickly. Saving and Loading the Image from TAR filesĭocker allows you to save images into tar files using the Docker save command. Let’s check out all such methods in this article. However, if you don’t want to go through all the hassles of creating an account, tagging the images, etc., there are other simple methods that you can use.


You need to have an account in Dockerhub and then you can use the Docker push command to push the images on it. The first is by pushing that image to a repository such as the ones in Dockerhub registry. If you have a Docker image in your own local machine and you want that image to be copied into another machine, there are two ways to do that.
