Please check the name of the file given. In my case I gave the name dockercompose.yml but it should be like docker-compose.yml. It worked after changing the name of the file