How can I permanently change Docker's default pull/download directory?
Asked by
CoolSpoon22
I'm trying to figure out how to permanently change the default pull or download directory for Docker, as everything currently goes to my /var/lib/docker directory. Is it possible to modify this setting using a .json file? For reference, my setup includes a 250GB NVMe drive for the main system and a 1TB HDD for my home directory.
Answers
You might want to keep Docker's directory on the SSD for better performance. Moving it to an HDD could slow things down quite a bit. Check out the Docker documentation for more details on this.
Reply to this answer
You need to edit the daemon.json file to change the default directory. Look for the `data-root` option and point it to your preferred directory. Check the Docker docs for the specifics!
Reply to this answer
Add your answer
Answers are reviewed before publication.
GamerDude99: I actually have an SSD too, but I only mount it when I want to game. It used to be my third mount point at /home/usr/Games.
StorageWhiz77: Using Docker on an HDD isn't the end of the world, just slower! It's good for backups or less demanding tasks.