Docker-compose container ports not working

Viewed 9261

I'm running a container that's initiated by docker-container like so:

  puppetboard:
    build: ./images/puppetboard
    image: puppet/puppetboard
    ports:
      - 5000:5000
    links:
      - puppetdb:puppetdb

It successfully builds and when I run docker ps I can see:

0.0.0.0:5000->5000/tcp

I can even go into the container using docker exec and use curl localhost:5000 which returns an html page.

I double check that host machine can see port 5000 on 127.0.0.2 (docker network) with nmap 127.0.0.2 and the port is available: 5000/tcp open upnp.

Yet when I go to 127.0.0.2:5000 in my browser on the host machine I get website not available. How can I debug this network issue?

Result of curl 127.0.0.2:5000 & curl 127.0.0.1:5000 is: curl: (56) Recv failure: Connection reset by peer.

2 Answers
Related