Introduction
Docker Compose files use versions to define how the file is read and which features are available. Using the right version helps Docker understand your app setup and run it correctly.
When you want to run multiple containers together with specific settings in one file.
When you need to use new Docker Compose features that require a certain file version.
When you want to ensure your Compose file works with the Docker Compose tool installed on your system.
When you want to share your app setup with others and make sure it runs the same way.
When you want to upgrade your Compose file to use newer syntax or capabilities.