How can I permanently change Docker's default pull/download directory?

May 14, 2025 2 answers
Asked by bamboo.shoots
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

WAIT.for.green
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.

mosaic tile cutter: 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.

COUNTERCLAIM: Using Docker on an HDD isn't the end of the world, just slower! It's good for backups or less demanding tasks.

Reply to this answer
batch5.yeast
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.

Related Discussions