Reputation: 11251
I would like my app inside docker to have access to the whole internet via host-machine.
I know that I can add particular ip --add-host=docker:10.6.210.32
But how can I add everything?
Upvotes: 10
Views: 43141
Reputation: 6539
You can use --net=host in docker run command
docker run --net=host -it ubuntu
Else add dns in config file in /etc/default/docker
DOCKER_OPTS="--dns 208.67.222.222 --dns 208.67.220.220"
for more info refer: http://odino.org/cannot-connect-to-the-internet-from-your-docker-containers/
Upvotes: 26