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

  • Cannot connect to HTTPS (443) from a docker image
  • Using load testing app in docker
  • How to import data to mongodb container and creating an image
  • MongoDB Script with rs.add() Not Executing As Expected
  • How to use docker to setup kafka and spark-streaming on a Mac?
  • How do you set an ssh key for docker image containing a private git repo?
  • 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
    

  • How create MongoDB cluster on Kubernetes?
  • Trouble accessing Kubernetes endpoints
  • Inserting a conditional RUN statement inside a dockerfile
  • How to send requests to a web server running inside a docker container inside an AWS EC2 machine from the outside world?
  • docker hub images tags are not showing using automated build from github organisation repo
  • How to parse a simple array with ng-admin
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.