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.

  • Cannot see Ipython notebook interface on a browser using Docker Kitematic
  • Upgrade docker on CentOS 7
  • Unable to push my docker to Bluemix - Login error
  • How to configure multiples ips for apps in docker
  • So many Binlog_dump connections in Processlist?
  • I want to create a Docker image which contains Java and PostgreSQL. I just want to create an Image to reuse it from anywhere
  • 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?

  • How can I reflect the data in one container to another?
  • docker-compose network_mode: “host” doesn't seem to work
  • Dockerize Spring Boot Java app with Kafka, Zookeeper, and MongoDB [closed]
  • transform command line docker to Dockerfile
  • docker-compose up giving error
  • how to cross docker-compose.yml file to link container
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.