Docker Community Forums

Share and learn in the Docker community.

Docker storage location change errors

Hi, I’ve changed the location of the Docker data directory, however, a strange phenomenon is happening on my system:

From /var/lib/docker to /media/user/drive/docker

I am using Ubuntu 18.04

I also have the Nvidia Container toolkit Runtime installed for GPU-based Docker usage.

every time my system starts, I cannot access my Docker containers as the location automatically changes to:

/media/user/drive/docker1

/media/user/drive/docker2

/media/user/drive/docker3

/media/user/drive/docker4

So I’ve to first edit the daemon.json to access my docker containers. Why is this happening ?