Docker Community Forums

Share and learn in the Docker community.

Overlay network with jwilder/nginx-proxy cannot access


(Llitfkitfk) #1
$ docker swarm init
$ docker network create -d overlay overlaynet
$ docker service create --replicas 1 --name whoami  --network overlaynet -e VIRTUAL_HOST=whoami.localhost  emilevauge/whoami 
$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro --name nginx jwilder/nginx-proxy
$ docker network connect overlaynet nginx

But, cannot access http://whoami.localhost(504 Gateway Time-out)