Docker didn't forward the port from web service

I’m using ASP Core image to create a new container.

I’ve developed simple service which uses port 5000.

  • Pull docker images from private registry on remote host?
  • how to set ulimit / file descriptor on docker container the image tag is phusion/baseimage-docker
  • Docker: SSH freezes on login
  • Bluemix Dev Ops: Building a project with private git submodules
  • Ubuntu14.04 vs Ubuntu12.04 docker images
  • How to develop applications with Docker which are in separate repositories
  • Now I created Dockerfile and built container which exposes

    EXPOSE 5000
    

    Running this container with a command

    docker run -it -p 8080:5000 <name>
    

    or even

    docker run -it -p 127.0.0.1:8080:5000 <name>
    

    doesn’t lead to navigation to the 127.0.0.1:8080. So my browser says this site can't be reached.

    p.s. I’ve checked the service without docker – it works correctly

    UPD1

    docker ps
    

    shows my launched container with ports mapping information:

    127.0.0.1:8080->5000/tcp
    

    UPD2

    this is netstat output from the host

    tcp        0      0 localhost:5000          *:*                     LISTEN
    

    lynx 127.0.0.1:5000 shows 200 OK

    netstat -a on a client box doesn’t show 8081 port or 5000

    UPD3

    I’ve just created a new container for NodeJs using public image.

    Created a simple server with exposed port. After running it works as expected.

    Actually it looks like the problem with exact Asp image

  • Create mongodb container w default data
  • Docker container name not resolved as DNS for overlay network not reachable
  • how do I manage specific versions of builds with Dockerfile
  • Docker Nginx + Node: address already in use
  • Setting up a docker / fig Mesos environment
  • Docker cp error: Path not specified
  • One Solution collect form web for “Docker didn't forward the port from web service”

    Which OS are you using? If you’re running on OSX or Windows you will need to use the IP of your boot2docker virtual machine, not 127.0.0.1.

    docker-machine ip will show you the IP of your current host.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.