Apologies in advance; I am relatively new to Docker and this may be a silly question.
I have been running Docker Desktop on a Windows 11 Pro machine. I have several volumes in Docker, all relating to Nextcloud. I have set the Docker image location as an otherwise empty drive formatted as exFAT.
I am considering changing the host OS from Windows to Ubuntu for performance reasons. Would I be able to simply install Docker Desktop in Ubuntu and point it at the image file on the exFAT drive, or are there any additional migration steps required from a Docker standpoint?
As far as I remember, there are small differences in the virtual machine depending on what platform it is used on. And the image format could be different too. I’m not 100% up to date with the current architetcure, but I would not move the entire VM image. Hopefully you have everything on volumes or bind mounted from the host and you have compose files or any command to reproduce the same container with the same settings. Then you need to export the volumes. only. and import it on Linux in a newly installed Docker Desktop.
Docker Desktop has a volume export/import feature. You can go to a volume in Docker Desktop, and select the “Export” tab. “Quick export” can save the volume as a tar gz file. Then move only those to the extFAT driver that can be read on Linux. Then load the volumes. To load a volume, you need to create it with the same name first. For example
docker volume create myproject-data
Thens elect the volume in Docker Desktop and click on “import” in the top right corner.
Just in case you prefer the command line, I have some scripts for expoting and importing volumes, but all are bash scripts, so you would need a bash shell, that could be a WSL2 distribution too, for which you enable the “WSL integration” in Docker desktop.
Many thanks for the detailed response! I can definitely export/import the volumes on the new OS. I thought it might be as easy as setting the path for the image, but I can see that your method is safer.