Access to a Docker for OSX Host from a container

Setting network as host is not quite enough for this case.
The working solution is here (according to

sudo ifconfig lo0 alias  
docker run -it --rm busybox ping  

The trick is to give the host's lo0 interface a new IP which can be accessed from the container.

Konpat Preechakul

Read more posts by this author.