Skip to content

Instantly share code, notes, and snippets.

@DzeryCZ
Last active June 18, 2018 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DzeryCZ/87e2dc64da20dd8eca725ea487966475 to your computer and use it in GitHub Desktop.
Save DzeryCZ/87e2dc64da20dd8eca725ea487966475 to your computer and use it in GitHub Desktop.
Bind custom mount points to fix Docker for Windows and WSL difference

In Windows 10 version >= 1803

Edit/Create /etc/wsl.conf and add this content:

[automount]
root = /
options = "metadata"

To make those changes take effect, you have to log out and log in to your Windows machine.

In Windows 10 version < 1803

Run

sudo mkdir /c
sudo mount --bind /mnt/c /c

Add to ~/.bashrc

# Mount /mnt/c to /c
sudo mount --bind /mnt/c /c
@DzeryCZ
Copy link
Author

DzeryCZ commented Jun 18, 2018

After sign-out and sign-in I had once this issue during accessing bash.exe:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x800703fa
Error: 0x800703fa Illegal operation attempted on a registry key that has been marked for deletion.

Press any key to continue...

Solved by running this in CMD as Administrator:

net stop LxssManager
net start LxssManager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment