What’s the Difference Between docker-compose.yaml and Custom YAML Files?

0
5
Asked By CuriousCoder99 On

I'm diving into Docker and trying to get a grip on how to use the Docker engine and CLI. I keep coming across references to `docker-compose.yaml` and then also to files like `.yaml`, and it's leaving me a bit puzzled. Are these two types of files meant to work together, or is it redundant to use both? Any explanations or links to documentation would be really helpful!

1 Answer

Answered By DevDiva87 On

Typically, `docker-compose.yaml` is the default filename for Compose. When you run `docker compose up`, it picks up the configurations from that file. If you're working with multiple services, you might create separate YAML files for each service, like `.yaml`, but you'll need to specify that filename when starting those services with `docker compose -f .yaml up`.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.