How to configure /etc/hosts to test local Docker setup How to configure /etc/hosts to test local Docker setup docker docker

How to configure /etc/hosts to test local Docker setup


you docker-for-mac ip ist not 0.0.0.0 - nothing has this ip. Use 127.0.0.1 if you are using docker-for-mac.

Also ensure, when you start docker, that you export the ports to the host, either by docker-compose or by docker run adding -p 80:80 when starting your web-container


see https://github.com/docker/docker/issues/2509

the address you specified is inaddr_any , which is basically a wildcard. so your problem is with the /etc/hosts file - bind the domain name to a real ip of the host, e. g. 127.0.0.1