-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker for Windows volume mounts and docker.sock #1110
Comments
There was a workaround found in docker/for-win#1829 Add an this environment variable: Or from Powershell run |
I am still getting my mount error even after changing that value to 1. |
Error:
docker-compose.yml:
|
@BaileyMillerSSI , it's likely that the variable isn't being set during execution of the script. you can test this on Bash by doing something like:
My comment here is more thorough. |
I lean out of the window and say that everyone forgot an important point: |
@padhie Linux Containers in Docker for Windows run within a vm under hyper-V. This VM is mapping its docker.sock to the This image runs in a Linux Container. |
@johnrom but you try an windows directory map and this isn't exists |
@padhie I think the misunderstanding is that setting this variable just happens to fix the problem by changing the way paths are parsed. It's not mapping this path to Windows in any way. This directory doesn't exist in Windows, it exists in the Hyper-V VM (Linux). Hopefully, this will help you understand. When you open Docker for Windows "Settings" and go to "Shared Drives", it helps you demonstrate the shared drive is working by entering this command:
What it then does, is automatically changes C:/Users to /c/Users in the background to demonstrate that C:\Users is correctly mounted within the Linux VM, and passed on to the container you create. What it doesn't tell you, is there is a way to prevent that from happening, and by doing that you can prove that you're actually mounting the drive from Linux to the Container. Using two slashes allows you to circumvent this conversion.
Now you'll see a Linux root directory, with folders like
Now you'll see that there is a |
I can confirm the workaround posted by @a727891 works, so I'm going to close this. Any further resolution wouldn't appear to be related to this repo. |
Mounting
/var/run/docker.sock
is no longer working in stable Docker for Windows with the latest update. There is an issue here: docker/for-win#1829I'm not sure whether the issue is that
docker.sock
file is no longer a reliable source for DFW, and if that is the case then the issue will have to be resolved here. However, if it's a bug and it should still be able to mountdocker.sock
on the Docker for Windows side of things, this bug should resolve itself in a future update.An example error is here:
Example
docker-compose.yml
:Docker Version:
18.03.0-ce-win59
The text was updated successfully, but these errors were encountered: