How to change the images storage location of Docker

Leo Pham
2 min readJun 12, 2020

My laptop is 9 years old and I upgraded the storage to just 128GB of SSD beside more than 500 GB of HDD disk. It makes me so confused whenever I have to update some apps and I don't even have enough space to install Xcode.

Recently I have to pull a large image file from Docker Hub and it turned out the SSD disk does not have enough space during the extracting. After a while trying to resize and googling how to mount the Docker's directory to a new space which I still spare in HDD drive, I managed to get there.

There is a configuration on the Docker Dashboard. Try to find the Preferences Settings.

From there you could see the Disk image location tag which helps you to redirect to a new directory where you wish to save the images.

It would take for a while to have Docker move its data file to the new location. From now on, all the pulled containers will be stored on that directory, and yes, it does save me a large portion of disk storage.

Docker Preference

--

--