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 launch my docker container automatically on ECS?
  • What is the minimum healthy percent and maximum percent in Amazon ECS
  • Docker letsencrypt does not appear to be creating webroot files
  • 502 bad gateway with nginx and node inside docker
  • What's the difference when installing docker with 2 of these following command?
  • Is it feasible to control Docker from inside a 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 commands fail in Cygwin — Docker service is up
  • Restrict Docker exposed port from only specific IP adresses
  • Is there an alternative to Dockerfile Env Instruction?
  • user unbound variable on docker run
  • Why does creating a file inside a docker-machine VM result in permission denied?
  • How to dockerize my new VPS server?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.