Skip to content

Instantly share code, notes, and snippets.

@evan-burke
Last active February 1, 2020 01:23
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 evan-burke/7cd9db089fce0765a5ea985f6d2e569f to your computer and use it in GitHub Desktop.
Save evan-burke/7cd9db089fce0765a5ea985f6d2e569f to your computer and use it in GitHub Desktop.
docker WSL volume mounts

Docker under WSL has some issues with volume mounts. They will tend to fail silently (as far as I can tell).

Steps to follow to get these working:

  1. Change default mount point for the Win host FS under WSL. Edit /etc/wsl.conf and add or change the following. You may need to fully reboot Windows for this to take effect.
[automount]
enabled = true
root = /
  1. Mounts in WSL must be under /c/ or they won't work.

  2. Double check your path name for container mount directory within Docker. If it doesn't exist, it'll fail silently.

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