I wish to make two of my containers available outside of the VM host on their separate, specific IP addresses (192.168.0.222
, 192.168.0.227
), without port mapping. That means I wish to access any port directly on the containers by using its IP. I already have machines running in the network outside of the VM host in the range 192.168.0.1–192.168.0.221.
Is this now possible with Docker 1.10.0, and if so, how?
I'm on OS X 10.11 with docker version 1.10.0, build 590d5108
and docker-machine version 0.6.0, build e27fb87
, using boot2docker/VirtualBox driver.
I have been trying to figure this out for some while, without luck, and I've read the following questions and answers:
According to Jessie Frazelle, this should now be possible.
See "IPs for all the Things"
That does illustrate the new
docker run --ip
option that you now see indocker network connect
.The "making accessible" part would involve, as usual, port forwarding.