Skip to main content

Stop all running docker containers and then docker daemon. Move "/var/lib/docker" directory to the place where you want to have this data. For you it would be:

mv -r /var/lib/docker /data/

and then create symlink for this docker directory in /var/lib path:

ln -s /data/docker /var/lib/docker

Start docker daemon and containers.

Stop all running docker containers and then docker daemon. Move "/var/lib/docker" directory to the place where you want to have this data. For you it would be:

mv -r /var/lib/docker /data/

and then create symlink for this docker directory in /var/lib path:

ln -s /data/docker /var/lib/

Start docker daemon and containers.

Stop all running docker containers and then docker daemon. Move "/var/lib/docker" directory to the place where you want to have this data. For you it would be:

mv /var/lib/docker /data/

and then create symlink for this docker directory in /var/lib path:

ln -s /data/docker /var/lib/docker

Start docker daemon and containers.

Source Link
mariaczi
  • 567
  • 2
  • 6

Stop all running docker containers and then docker daemon. Move "/var/lib/docker" directory to the place where you want to have this data. For you it would be:

mv -r /var/lib/docker /data/

and then create symlink for this docker directory in /var/lib path:

ln -s /data/docker /var/lib/

Start docker daemon and containers.