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.

  • ECS Showing Error After Running Task Definition “STOPPED (Essential container in task exited)”
  • Overriding image version in docker-compose file
  • Building docker image, inside an alpine linux container
  • Mount samba volume in docker container
  • Tomcat doesn't start in docker container because it can't create log files
  • Docker : How to run grunt-open?
  • 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:
    https://gist.github.com/md2perpe/2639afcd79e359a857ef94ba7908fb80

    Why can’t I reach the small web server?

  • Package manager on the Docker Machine default VM?
  • docker-compose up “Cannot start service frontend: oci runtime error: not a directory”
  • Docker - Could not load X509 key pair
  • docker build giving unauthorized: authentication required
  • Docker error trying login (and anything)
  • pull from private docker repo in msbuild
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.