Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What does the first line in the "docker-compose.yml" file, that specifies the version mean?

In the first line of the docker-compose.yml file we specify a version:

version: '3.9'

What exactly does this mean?!

After installing the latest version, I tried the following in my Windows 10 cmd:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

docker-compose --version

and the output was:

Docker Compose version v2.17.2

so how is it that we type 3.9 in the first line?!

>Solution :

https://docs.docker.com/compose/compose-file/04-version-and-name/

Top-level version property is defined by the specification for backward compatibility but is only informative.

It specifies the version of the compose file schema, not the version of docker-compose.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading