unable to launch dockerized node app in browser

I am not able to launch dockorize node app. I have removed docker toolkit and installed docker native to MAC

docker-compose.yml web setting

  • how to permanently set environment variable for boot2docker
  • How can I periodically backup a Postgres database in a Docker container, when volume mounts aren't working?
  • Is there a way to tell gradle which profiles should be used for the tests?
  • How to use stack image container?
  • Database location in Microservices Architecture
  • Publishing vNext project to Windows Server 2016 Preview Container
  • services:  
      web:
        image: node:boron
        ports: 
          - "3000:3000"
        volumes:
          - .:/apicode   
        depends_on:
          - db
        entrypoint: /bin/bash
        tty: true
    

    when I run
    docker-compose run web
    on command line , I can see the container launched.

    What I am getting confused about is missing port mapping. I feel MAC is not able to reach container to serve the request …

    docker inspect hostname

     "Path": "/bin/bash",
            "Args": [],
            "State": {
                **"Status": "running",**
                "Running": true,
    
     CONTAINER ID   IMAGE       COMMAND     CREATED STATUS       PORTS    
     b61db44d38a7   node:boron  "/bin/bash" About a minute ago      
    

    Expected

     CONTAINER ID   IMAGE       COMMAND     CREATED STATUS       PORTS    
     b61db44d38a7   node:boron  "/bin/bash" About a minute ago      3000:3000
    

    http://localhost:3000 is expected to load the page.

    My code is under /users dir of MAC so it is mounted correctly.

    Whats wrong…

    docker log [id]
    root@d838:/# exit
    exit
    

  • docker mounting volumes on host
  • Docker doesn't get 100% of the CPU
  • How to make docker containers host-agnostic
  • How to automatically delete old Google App Engine version instances?
  • Unable to pull docker image - Repository not found
  • How can a bash script restart a process on non-0 exit while sending signals to child
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.