Skip to content

Instantly share code, notes, and snippets.

@f0ster
Created August 17, 2017 23:19
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 f0ster/9110566d9788be37edd3e44b9a64aeb3 to your computer and use it in GitHub Desktop.
Save f0ster/9110566d9788be37edd3e44b9a64aeb3 to your computer and use it in GitHub Desktop.
Using docker volumes in windows linux subsystem
# Docker for Windows/Docker Machine is mounting C:\Users\ of your Windows to //c on the Docker host.
sudo touch /usr/local/bin/docker
sudo chmod +x /usr/local/bin/docker
cat EOF > /usr/local/bin/docker
#!/bin/bash
ARGS=`echo -n "$@" | sed -E 's/\/mnt\/([a-z])\//\/\/\1\//g'`
eval /usr/bin/docker $ARGS
EOF
## great success
# docker run --rm -v /mnt/c/Users:/data alpine ls /data ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment