change default docker image path

Change default docker image path

Recently, My C disk is full, and I found that this is because the default docker image path is in C disk and it takes up almost 60GB.
I want to change the default docker image path to D disk.

I found this docs

Install docker with Command Line

1
"Docker Desktop Installer.exe"  install --installation-dir="PATH"

replace PATH with the path you want to install docker.

e.g.

1
"D:\Download\Docker Desktop Installer.exe"  install --installation-dir="D:\Program\Docker"

Run the command above in the command line, and it will install docker to D disk.

Change docker image path

After installing docker, you can change the default docker image path in the settings.

  1. Right click the docker icon in the taskbar and select “Settings”
  2. Click “Resources” in the left menu
  3. Click “Advanced” in the top menu
  4. Change the “Disk image location” to the path you want
  5. Click “Apply & Restart” to save the changes

Reference

Windows10 docker安装D盘,更改docker镜像默认保存路径