How to Copy Docker Images from One Host to Another without Using a Repository

Better Stack Team
Updated on August 1, 2022

There is an easy way to transfer Docker images from one host to another without using any repository.

Copy Docker images from one host to another

First, you need to save the docker image as a tar:

docker save -o <path-for-generated-tar-file.tar> <image-name>
  • <path-for-generated-tar-file> - This will be the location of the generated tar file with the image inside
  • <image-name> - This is the name of the image you want to save / copy / transfer

Then, transfer the tar file to the new system using one of the popular methods (cp, scp, rsync)

Lastly, load the image into Docker on the second host:

docker load -i <path-to-image-tar-file.tar>
  • <path-to-image-tar-file> - This is the location of the tar file containing the image

Make your mark

Join the writer's program

Are you a developer and love writing and sharing your knowledge with the world? Join our guest writing program and get paid for writing amazing technical guides. We'll get them to the right readers that will appreciate them.

Write for us
Writer of the month
Marin Bezhanov
Marin is a software engineer and architect with a broad range of experience working...
Build on top of Better Stack

Write a script, app or project on top of Better Stack and share it with the world. Make a public repository and share it with us at our email.

or submit a pull request and help us build better products for everyone.

See the full list of amazing projects on github