skip to Main Content

I’ve noticed that the Docker documentation now recommends calling Docker Compose’s file compose.yaml instead of docker-compose.yaml.

Is there a reason for this change? Does the newer version provide more features?

2

Answers


  1. If I had to take a guess at it, it is due to that fact podman also has a compose and podman compose is a strict subset of docker compose. In other words, a podman compose file could be ran by docker compose but a docker compose file will not always be runnable by a podman compose.

    At least that’s what I’ve gathered from this redhat link after a quick search on the difference between docker and podman compose.

    https://www.redhat.com/sysadmin/podman-compose-docker-compose#:~:text=For%20example%2C%20Podman%20Compose%20can,tested%2C%20and%20likely%20more%20stable.

    Login or Signup to reply.
  2. Actually, this modification is quite old since it was made in 2021 and inserted in the release 1.28.6, one of the last versions before Docker Compose V2.

    It was just a file renaming activity, with no new functionalities associated which, instead are related and follows the usual Docker Compose releases.

    The main difference is that if you execute docker-compose with no options it will search for compose.yml first and then, if not present, for docker-compose.yml for backwards compatibility of earlier versions.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search