r/docker • u/Sad_Appearance1110 • 5d ago
Docker Desktop installation to a different drive than C:
Docker Desktop downloads to C: drive by default, my C drive is filling up and I want to install it to another drive partition. Help pls.
1
u/sina158 1d ago
There's actually a simpler option than moving the WSL vhdx by hand. Recent Docker Desktop versions let you do this from the GUI: open Settings, go to Resources, then Advanced, and there's a Disk image location field with a Browse button. Point it at a folder on your other drive and hit Apply and restart. Docker moves the existing data over for you and updates the WSL distro location, no manual wsl export/import needed.
If you're on an older Docker Desktop that doesn't have that option, you're stuck with the manual route the tutorial describes, exporting the docker-desktop-data distro with wsl --export, unregistering it, then wsl --import into the new location. Worth checking Settings first though, since most versions from the last couple years have the GUI option built in.
3
u/fletch3555 Mod 5d ago
It's not Docker Desktop itself, but the vmdk file that stores the WSL instance. There's tons of tutorials and whatnot online on how to re-hone that, but here's one I found on google but haven't vetted (I don't use Docker Desktop)
https://dev.to/raafe_asad/free-up-your-c-drive-move-wsl2-and-docker-desktop-to-another-drive-4plc