Cannot reach web server inside Docker
I’m doing some recapitulation of my Docker knowledge but have run into a problem that I don’t understand.
I created a simple web server in Go and have no problems running it inside a Docker container. But I cannot reach it from outside.
Since I thought that perhaps something is blocking access to Docker containers, I tried running an SSHd container. That works fine; I can reach it and log in using SSH.
You can see my Dockerfile and my small Go code in this gist:
Why can’t I reach the small web server?