Docker Community Forums

Share and learn in the Docker community.

Run docker-compose from aws ecs instance

I have started an aws ecs instance with “ECS Optimized Amazon Linux 2” image. I have connect to the instance using ssh and then logged in to docker using command docker login .

I have a private repo on dockerhub, when I try to run in it using command docker run -p 4001:4001 myUser/my-app , it works fine. But when I run it using docker-compose up , it gives below error:

ERROR: 
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml

How do I let docker-compose know to get it from my dockerhub account?