I have this file: docker-compose.test.yml
But when I try to run docker-compose
, this happens:
$ docker-compose up
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
Is there some option to specify which file to use?
Compose uses the project name to create unique identifiers for all of a project's containers and other resources. To run multiple copies of a project, set a custom project name using the -p command line option or the COMPOSE_PROJECT_NAME environment variable.
The default filename is docker-compose. yml . You can name the manifest name as you like, but you have to pass the filename in the docker-compose command.
To use multiple override files, or an override file with a different name, you can pass the -f option to the docker-compose up command. The base Compose file has to be passed on the first position of the command.
Use -f
option to specify the file name.
Example:
docker-compose -f docker-compose.test.yml up
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With