Reputation: 464
As part of using Docker as a development tool, I want direct access to docker containers that Boot2Docker has brought up.
For example if
docker inspect {container id}
says the ip is 172.17.0.5, I would like to be able to connect to the container via that ip address.
I'm completely against mounting ports on the boot2docker vm and connecting via them, it wont work for me long term.
Is there any kind of virtualbox config I can change to allow that kind of direct access.
Upvotes: 1
Views: 176
Reputation: 464
This worked perfectly :
sudo route -n add 172.17.0.0/16 boot2docker ip
Found the answer on a comment here : http://ispyker.blogspot.co.uk/2014/04/accessing-docker-container-private.html
Upvotes: 3