Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
ARGS=`echo -n "$@" | sed -E 's/\/mnt\/([a-z])\//\/\/\1\//g'`
eval /usr/bin/docker $ARGS
## 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