0

I am looking for a way to migrate docker containers

From : a Windows 7 system with Docker Toolbox (= using Virtualbox)

To : a Windows 10 system with Docker for Windows (= using Hyper V)

Some of my containers have DBs with data, and obviously I'd like to keep all the data.

I know that on my Win7 there is a C:\Users\xxx\.docker\machine\machines\default\disk.vmdk file, but I don't think I can use this file on Win10 because HyperV uses vhdx files.

Even if I could convert the vmdk to a vhdx, is it enough to migrate all my containers and keep linked volumes etc. ?

Clemorphy
  • 464
  • 1
  • 4
  • 17
  • Are you trying to migrate the containers (running services) or the images (blueprints for containers)? If the images, push to a remote register, the `docker pull` on the new machine. If `container`, you will not be able to. Containers are a executing instance of an image. It would be like saying 'I want to move a running process of explorer.exe to a different Windows machine.'. – David J Eddy Jul 15 '19 at 12:48
  • I want to migrate containers, not while they are running. They totally can be stopped. If I push / pull images of my containers to a registry, will it keep my DB data, linked volumes ... ? – Clemorphy Jul 15 '19 at 15:26
  • I stand corrected, it is possible to migrate a container: https://bobcares.com/blog/move-docker-container-to-another-host/ It sounds like you want the last option `5. Move entire Docker containers`. I ideally, though, your containers should not be treated like VMs. Containers should be destroyable and recreatable on demand. containers are cattle, not pets. – David J Eddy Jul 15 '19 at 16:42

0 Answers0