I can't start application with Docker in mongodb

Viewed 33

I can't understand how to start my application in Docker, I tried many ways, here in this platform, but it hasn't worked for me

this photo looks like it works using

 docker run -d -p 80:80 docker/getting-started

what is it, the one that brings proof

enter image description here

But when I try to launch my application, it does not work, I only get the error that I am going to show in the photo

Cannot start Docker Compose application. Reason: Error invoking remote method 'compose-action': Error: Command failed: wsl -d Ubuntu-18.04 -e sh -c "cd "/mnt/c/proyect-shop"; docker compose --file "docker-compose.yaml" --project-name "proyect-shop" --project-directory "/mnt/c/proyect-shop" up -d" Container teslo-database Created Container teslo-database Starting Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:27017 -> 0.0.0.0:0: listen tcp 0.0.0.0:27017: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.

enter image description here

here I am going to leave my docker-compose.yaml

  version: '2'
    services:
      teslodb:
        image: mongo:5.0.0
        container_name: teslo-database
        ports:
          - 27017:27017
        volumes: 
          - /mongo:/data/db

please anything else you need to understand my problem let me know in comments

0 Answers
Related