Created
August 17, 2017 23:19
-
-
Save f0ster/9110566d9788be37edd3e44b9a64aeb3 to your computer and use it in GitHub Desktop.
Using docker volumes in windows linux subsystem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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