Reputation: 7997
I'm on OSX using boot2docker. There's a redis server running on the OSX host on port 6379 and I'd like to access it from inside the container.
However:
docker@boot2docker:~$ telnet 172.17.42.1 6379
telnet: can't connect to remote host (172.17.42.1): Connection refused
How do I expose the host port 6379 to the container?
Upvotes: 2
Views: 1864
Reputation: 54790
I answered a similar question here. You can either run your container with --add-host
as mentioned or you might also be able to use your local Mac's dns name directly.
Upvotes: 1