Skip to content

Instantly share code, notes, and snippets.

@Codes-Lab
Created May 16, 2023 12:37
Show Gist options
  • Save Codes-Lab/860ad14950eca61ba8342a389342beca to your computer and use it in GitHub Desktop.
Save Codes-Lab/860ad14950eca61ba8342a389342beca to your computer and use it in GitHub Desktop.
  • The default location of the Docker Desktop WSL virtual disk is the C drive and bigger containers can lead the C drive to get full quickly. In case we want to move the docker desktop disk to a different drive/location we can follow the steps below:

  • Docker disk default location at (%LOCALAPPDATA%/Docker/wsl/data)

  • Open PowerShell with Admin rights

  • Quit Docker Desktop

  • And run following command to get the docker-desktop-data file name

  • wsl -l -v

  • Shutdown the wsl

  • wsl --shutdown

  • Export the docker-desktop-data to some other location as tar file

  • wsl --export docker-desktop-data d:\dddisk\dockerdisk.tar

  • Import the exported tar file as new docker-desktop-data

  • wsl --import docker-desktop-data d:\dddsik\ddesktop d:\dddisk\dockerdisk.tar

  • Check that all components are running again

  • wsl -l

Restart docker desktop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment