What is the process for moving a Docker image from one Droplet to another? thank you

We currently have a ‘Docker Image’ running on a Droplet (MUCH to big)… we need to migrate this to some other Droplet. What is the process for moving a Docker image from one Droplet to another? thank you


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


There are a few ways to do that:

    1. Export and import containers

This would essentially mean that you would compress the data to a file from the container’s file system. The data would be saved as a ‘gzip’ file. To do that run:

docker export CONTAINER_NAME | gzip > CONTAINER_NAME.gz

Then copy this file to the droplet and start the container with:

zcat CONTAINER_NAME.gz | docker import - CONTAINER_NAME

After that start the container on the new host with the docker run command.

    1. Image migration

This is the most commonly used method. You would need to first create a docker image of the running container with the docker commit command:


Then you can push your image to docker hub:

docker image tag IMAGE_NAME YOUR_TAG

After that push your new image to docker hub. For that you would need a docker hub account first:


docker login

Push the image:


Then on your new droplet, login to docker hub again:

docker login

And pull your image:

docker pull IMAGE_NAME
    1. Save and load images

The images can be compressed using docker save and moved to a new host.

docker save IMAGE_NAME > IMAGE_NAME.tar

This would create a tarball of your local docker image which you could copy to your new server and re-deploy with the docker load command:

docker load -i IMAGE_NAME.tar

If all went through successfully you should be able to see your new image with:

docker images

Hope that this helps! Regards, Bobby