roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

[Docker Desktop] Cannot change default installation drive on Windows?

Open MoacirSchmidt opened this issue 4 years ago • 82 comments

Cannot change default installation drive on Windows?

Is that right? I refuse to believe!

Seizing the opportunity: Congratulations for your excellent product!

MoacirSchmidt avatar May 18 '20 01:05 MoacirSchmidt

Why cannot we chose the install folder like in any other application?

  • Some corporate developer machines only allow installs to specific directories.
  • Spaces may be an issue (my case, it is creating all sorts of problems to run in scripts supporting Mac, Linux, Windows 7 (not dead everywhere) and 10 and losing hours and hours on that.
  • You may have a faster disc as D: vs the default C:
  • Your C: can be full

We are in 2021. Please just give us the choice of where to install. Don't assume our choices and needs.

If you read this, you maybe interested in this band aid solution

odupuy avatar Aug 13 '21 15:08 odupuy

Same issue over here.. Is there somehow a bypass solution in some small steps I can follow to accomplish this please (also running WIN10 Docker Hyper-V with C drive, not possible to use D drive)?

crimunit avatar Aug 20 '21 10:08 crimunit

@crimunit try the band aid solution that I posted upper

odupuy avatar Aug 20 '21 10:08 odupuy

Any update on this?

jordanhooper73 avatar Sep 01 '21 08:09 jordanhooper73

Hey all, sorry we haven't responded! No update on this one yet :( cc @stephanierifai as an FYI

nebuk89 avatar Sep 01 '21 12:09 nebuk89

are there any updates?

dmdhrumilmistry avatar Nov 14 '21 18:11 dmdhrumilmistry

Hi all, sorry still no updates here yet :( Thanks for checking in

stephanierifai avatar Nov 15 '21 14:11 stephanierifai

Hi, still no updates here yet!

sinaqahremani avatar Dec 03 '21 09:12 sinaqahremani

Hi, any updates... ?

sahlekebe avatar Dec 26 '21 14:12 sahlekebe

2022 is knocking at our door and still no traction on this.

odupuy avatar Dec 26 '21 15:12 odupuy

Hi, any updates....??

logm1lo avatar Jan 11 '22 09:01 logm1lo

We get the "still any updates?" message all the time and still no updates!

sinaqahremani avatar Jan 11 '22 09:01 sinaqahremani

Fine....... I will do this myself

logm1lo avatar Jan 11 '22 12:01 logm1lo

First month of 2022 is about to end still no update !!

Chetan177 avatar Jan 18 '22 07:01 Chetan177

I have tried this and moved the ext4 volume to a secondary drive and Docker working fine

wsl  --shutdown
mkdir D:\Docker\wsl\data\
wsl --export docker-desktop-data "D:\Docker\wsl\data\docker-desktop-data.tar"
wsl --unregister docker-desktop-data
wsl --import docker-desktop-data "D:\Docker\wsl\data" "D:\Docker\wsl\data\docker-desktop-data.tar" --version 2

Make sure you only use this on the fresh installation only. If you have docker containers and images it throws an OutOfMemory error

Link

Chetan177 avatar Jan 18 '22 08:01 Chetan177

I was able to achieve this by manually creating symlinks. Here's my setup, everything goes into "D:\Program Files\Docker". Run this before installing Docker Desktop

md "D:\Program Files\Docker\ProgramDataDocker"
md "D:\Program Files\Docker\ProgramDataDockerDesktop"
md "D:\Program Files\Docker\ProgramFiles"
md "D:\Program Files\Docker\RoamingDockerDesktop"
md "D:\Program Files\Docker\RoamingDocker"
md "D:\Program Files\Docker\AppDataDocker"

mklink /j "C:\ProgramData\Docker" "D:\Program Files\Docker\ProgramDataDocker"
mklink /j "C:\ProgramData\DockerDesktop" "D:\Program Files\Docker\ProgramDataDockerDesktop"
mklink /j "C:\Program Files\Docker" "D:\Program Files\Docker\ProgramFiles"
mklink /j "C:\Users\Administrator\AppData\Roaming\Docker Desktop" "D:\Program Files\Docker\RoamingDockerDesktop"
mklink /j "C:\Users\Administrator\AppData\Roaming\Docker" "D:\Program Files\Docker\RoamingDocker"
mklink /j "C:\Users\Administrator\AppData\Local\Docker" "D:\Program Files\Docker\AppDataDocker"

You'll need to replace "Administrator" with your Windows user name and "D:\Program Files\Docker" with whatever your desired destination folder is.

gallargit avatar Jan 18 '22 11:01 gallargit

I was able to achieve this by manually creating symlinks. Here's my setup, everything goes into "D:\Program Files\Docker". Run this before installing Docker Desktop

md "D:\Program Files\Docker\ProgramDataDocker"
md "D:\Program Files\Docker\ProgramDataDockerDesktop"
md "D:\Program Files\Docker\ProgramFiles"
md "D:\Program Files\Docker\RoamingDockerDesktop"
md "D:\Program Files\Docker\RoamingDocker"
md "D:\Program Files\Docker\AppDataDocker"

mklink /j "C:\ProgramData\Docker" "D:\Program Files\Docker\ProgramDataDocker"
mklink /j "C:\ProgramData\DockerDesktop" "D:\Program Files\Docker\ProgramDataDockerDesktop"
mklink /j "C:\Program Files\Docker" "D:\Program Files\Docker\ProgramFiles"
mklink /j "C:\Users\Administrator\AppData\Roaming\Docker Desktop" "D:\Program Files\Docker\RoamingDockerDesktop"
mklink /j "C:\Users\Administrator\AppData\Roaming\Docker" "D:\Program Files\Docker\RoamingDocker"
mklink /j "C:\Users\Administrator\AppData\Local\Docker" "D:\Program Files\Docker\AppDataDocker"

You'll need to replace "Administrator" with your Windows user name and "D:\Program Files\Docker" with whatever your desired destination folder is.

I appreciate your solution and consider it as a good one for my challenge, but I think such an application in this scale of usability must provide this feature.

sinaqahremani avatar Jan 18 '22 12:01 sinaqahremani

Thanks all for your continued input! No updates yet, but going to look a bit more into it with the team.

stephanierifai avatar Jan 28 '22 15:01 stephanierifai

Actually this feature is really demanded, It shows user that they have choices about where they can put file of installed software

mouhsineelachbi avatar Apr 03 '22 18:04 mouhsineelachbi

Looks like Microsoft "resolved" it:

Unhandled Exception: System.Exception: Path contains symlink: C:\ProgramData\DockerDesktop at Docker.Core.PermissionUtils.CheckPath(String path, Boolean allowDockerAppData) in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 274 at Docker.Core.PermissionUtils.CheckACLBeforeRestrictAndCheckSymlink(ILogger logger, String path) in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 93

CatalinSerafimescu avatar May 04 '22 07:05 CatalinSerafimescu

Looks like Microsoft "resolved" it:

Unhandled Exception: System.Exception: Path contains symlink: C:\ProgramData\DockerDesktop at Docker.Core.PermissionUtils.CheckPath(String path, Boolean allowDockerAppData) in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 274 at Docker.Core.PermissionUtils.CheckACLBeforeRestrictAndCheckSymlink(ILogger logger, String path) in C:\workspaces\PR-17739\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 93

How they solve It ?

mouhsineelachbi avatar May 04 '22 11:05 mouhsineelachbi

It explicitly checks for symlinks and blocks the installation. @gallargit 's solution doesn't work anymore. Though one can install it, then move the folders. For me it needed 3 tries until it started eventually (it took a while to initialize)

CatalinSerafimescu avatar May 04 '22 11:05 CatalinSerafimescu

It explicitly checks for symlinks and blocks the installation. @gallargit 's solution doesn't work anymore. Though one can install it, then move the folders. For me it needed 3 tries until it started eventually (it took a while to initialize)

Fool me, I though they really solved it

mouhsineelachbi avatar May 04 '22 12:05 mouhsineelachbi

This solution help me in 2022 https://blog.codetitans.pl/post/howto-docker-over-wsl2-location/

usama-saeed831 avatar May 15 '22 07:05 usama-saeed831

Yes!!!!! It's 2022 and I should be able to choose my disk as many of us have a mix of SSD and Hard Disk.

wotupfoo avatar Jun 06 '22 19:06 wotupfoo

Yes!!!!! It's 2022 and I should be able to choose my disk as many of us have a mix of SSD and Hard Disk.

Yepp, I don't prefer installing software on my ssd due to lack of storage. We would appreciate if docker team would provide us feature to install docker on drive of our choice.

dmdhrumilmistry avatar Jun 07 '22 11:06 dmdhrumilmistry

Can't believe they haven't released this feature yet. +1

jadynekena avatar Aug 02 '22 11:08 jadynekena

@jadynekena I can't believe it, too. More than two years ago, @MoacirSchmidt opened this issue.

sinaqahremani avatar Aug 02 '22 11:08 sinaqahremani

no one working on this already?

luucaslfs avatar Aug 04 '22 04:08 luucaslfs

Hi, we need this feature!

thelollipopka avatar Aug 19 '22 09:08 thelollipopka