I am getting below error when I try to share local drive(volume) with docker for windows
docker run --rm -v c:/Users:/data alpine ls /data
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: C: drive is not shared. Please shar
e it in Docker for Windows Settings.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.
I tried sharing the folder from the docker settings and provided my username and password but no luck and getting same error
I had a similar issue with the error message "docker: Error response from daemon: Drive sharing failed for an unknown reason."
I opened the docker settings > Shared Drives > checked on C drive > Click Apply and re-started docker to resolve the issue
I was facing a similar issue when starting containers with docker-compose. I got an error:
A firewall is blocking file sharing between Windows and the containers.
Then I checked settings for Docker and under Shared Drives section I tried to check the checkbox for C: drive, but after hitting apply checkbox unchecked itself.
Then I copied the line docker run --rm -v c:/Users:/data alpine ls /data
into Powershell, ran it and got the error:
Drive sharing failed for an unknown reason.
But after this error, I decided to just try restarting Docker. After the restart, I tried to check the checkbox in the Shared Drives section once again and now it stayed checked and everything is working as it should.
I was using Docker Stable version.
At the moment at Creators Update (1703) Samba shares are not working. There are a lot of tickets in official repo:
For example: #662, #669, #756
There is workaround described here:
The same started happening for me after installing the Win 10 Creators Update (Build 15063)
Firewall rules are not the issue, those are correct for some reason, after a reboot, I cannot access any local SMB shares on the DockerNAT interface (10.0.75.1)
I am able to fix this temporarily by disabling and & re-enabling the"File and Printer Sharing for Microsoft Networks" component on the virtual "DockerNAT" network interface. afterwards, I am able to browse \10.0.75.1 disable & re-enable the shared drive in Docker settings and it works - until next reboot
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With