How can I move Docker data?

Hallo, I am on DietPi version 8.15.
I have Docker and Portainer installer.
I would like to move all of my dockers and data to my NAS.
Is something I can do?
I could also export my dockers and reimport them after changing base root folder, but I do not know how to do on DietPi.

TIA

Luca

Did you tried to move whole DietPi user data? Should be possible using drive manager.

I do not want to move all of it, I would like to move docker userdata only.

in this case you would need to do it manually. Stop Docker, move /mnt/dietpi_userdata/docker-data and create a symbolic link to point to new location.

1 Like

Ok, thank you very much

Hi there!

would it work too, if i change the path in the /etc/docker/daemon.json?

  1. Stop docker
  2. copy files to new location ( including rights and permissions )
  3. edit /etc/docker/daemon.json to the new location
  4. start docker
  5. delete old filelocation after testing all dockercontainers.

Thanks in advance, Tom

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.