Failed to share C drive on Docker for Windows

I am using Docker Desktop for Windows on Windows 10 Enterprise. I get the following:

PS C: \ Users> docker starts --rm -vc: / Users: / data alpine ls / data C: \ Program Files \ Docker \ Docker \ Resources \ bin \ docker.exe: error response from the daemon: C: disk Do not share it in Docker for Windows Settings.

From the Docker settings on the Shared Drives tab, I see that there is a C drive, but it has not been verified. When I check it and click "Apply", I’m asked for a password. After a successful login, the C drive is still not checked.

+6
source share
3 answers

There are various problems that people face when sharing. But the general one is a non-English character-based password or a password with spaces.

If you can change your password and remove spaces / special characters other than English, then it should work.

Another workaround you can try is to create a local user and give him access to C: and then when sharing the C: \ in docker settings using these local user credentials

+5
source

The user account provided must also have administrator permission. It seems obvious, but Docker does not return an error message on failure (Version 18.06.1-ce-win73 (19507)). Be sure to subsequently run PowerShell on behalf of this administrator account to access the share.

0
source

Make sure it is switched to Windows containers.

Right-click the docker logo → Switch to Windows containers.

0
source

Source: https://habr.com/ru/post/1264025/


All Articles