-
Notifications
You must be signed in to change notification settings - Fork 871
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
File creation within a Docker bind mount doesn't appear in WSL until lxss is restarted. #3571
Comments
I would like to point out that the files I am referencing are mounted in the directory that the link you have provided points out. WSLENV translates this file path to a path on the Another thing the link points out is not modifying files here: Are you essentially telling me it is impossible to run docker from WSL (or that this is in fact a bug on docker)? |
Sorry about that. The directory The problem here isn't using bind mounts, exactly. You're using a bind mount into a Windows volume, pointed at the WSL private data directory. Because you've set up docker using this guide, you're asking the linux docker client to tell the Windows docker daemon to run a linux utility (via LCOW) to manipulate the WSL files for you. |
Microsoft Windows [Version 10.0.17134.285]
Using docker bind mounts to modify files on host system
Repro:

Set an environment variable in Windows that points to the Windows package for WSL:
DOCKER_MOUNT_LOCATION
Make this variable available in WSL:

have docker for windows installed.
Setup WSL to run docker on Windows
in WSL console, run:
inside container:
In a separate WSL Window:
any_new_file.anything does not appear.
Try touching this file in the second WSL window.
In CMD window
Exit all WSL windows and open a new WSL console window:

NOTE: The lack of permissions may be due to this same issue or may be strictly to Docker, however, this permissions issue appears regardless of setting the dockerfile user to the same UID and GID as the WSL user
i.e. uid=(1000) gid=(1000)
Ideally, when running a docker container with a bind mount to a host windows directory, changes that occur in the docker container appear in the WSL console. (They do appear in CMD console).
You should not get file Input/Output error when trying to access the files.
The text was updated successfully, but these errors were encountered: