Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The right way to move a data-only docker container from one machine to another

I have a database docker container that is writing its data to another data-only container. The data-only container has a volume where it stores the data of the database. Is there a "docker" way of migrating this data-only container from one machine to another? I read about docker save and docker load but these commands save and load images, not containers. I want to be able to package the docker container along with its volumes and move it to another machine.

like image 285
Keeto Avatar asked Sep 08 '14 18:09

Keeto


People also ask

Can you move a Docker image to another machine?

In order to transfer a Docker image from one server to another, what you need to do is first export the image to a file, then copy that file over from your current server to the new one using scp or rsync and finally load the image to your new server.


1 Answers

Checkout the flocker project. Very interesting solution to this problem, using ZFS to snapshot and replicate the storage volume between hosts.

like image 117
Mark O'Connor Avatar answered Oct 13 '22 23:10

Mark O'Connor