Docker for Windows Version 2.0.0.3 (31259)
S.O: Windows 10 Pro (1809)
error:
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: Drive sharing failed for an unknown reason.
See ‘C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help’.
The error occurs when executing the command from Powershell: docker run --rm -v c:/Users:/data alpine ls /data
behavior: you can not attach the c: drive from windows to the docker environment for its use.
when the command is executed, it asks the key and user of windows and it is given its correct credentials even if it emits the error, the local user has the following local permissions:
Administrator
Docker users
Hyper-V Administrators
users.
Do you have a firewall solution installed on your PC, for example Kaspersky? If yes, check if the Docker network (DockerNAT) is labeled as a trusted network.
Go to Docker Settings - the Network tab.
Copy the daemon’s IP address from there (usually 10.0.75.0).
Now go to the Shared Drives tab and click Reset credentials.
Check the Shared checkbox for the drive you want and then Apply. In the dialog that appears, enter as username: the IP address of the daemon, backslash, your Windows username.
Assuming you have the default IP for the daemon, it should look like this: 10.0.75.0\yourwindowsusername
In the password field enter your Windows password.
Apply.
Happy mounting!
After I ran the command to create the volume and map it to the container, window actually showed a notification that Docker wants to share something, and when I clicked share, a pop up requesting my password appeared and after I entered my password, everything worked as required.