Last active
September 22, 2017 05:25
-
-
Save smuuf/0467311bdb8b2c62ce7bf04eb9a9f8db to your computer and use it in GitHub Desktop.
Access Docker host IP as "localhost" inside container when using Docker on Windows Hyper-V backend
This file contains hidden or 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 client inside WSL + Container running under Docker on Windows (tested on Hyper-V's VM) | |
docker run --add-host=localhost:$(ifconfig | grep -E "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d: | head -n1) -it <...containerID...> /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment