DEV Community

Discussion on: Access host from a docker container

 
jamescook profile image
james-cook

I had exactly the same problem.
Confusingly ping was working from the container but e.g. wget and traceroute etc. were not (a good indication of a firewall "problem").

In my set-up the solution was:

ufw allow in to 172.17.0.0/16 proto tcp port 8084

where 172.17.0.1 is the docker0 IP address and 8084 the port on the host machine.