Docker: Why port forwarding is not working with go tour? -
dockerfile
from golang:latest expose 3999 entrypoint ["go", "tool", "tour"]
it starts go tour @ http://localhost:3999
i'm running docker run -d -p 127.0.0.1:3999:3999 "hubusername/docker-tour:v1"
but $ curl http://localhost:3999
returns error:
curl: (56) recv failure: connection reset peer
of course, ip:3999 in browser doesn't work too.
p.s. docker run -d -p 8081:80 nginx:alpine
works perfect
ok, i've setted 0.0.0.0 host go tour application adding line:
cmd ["-http", "0.0.0.0:3999", "-openbrowser=false"]
Comments
Post a Comment