Skip to content

Docker Compose File YAML Version 2 vs 3 #81

Answered by BretFisher
viralganatratb asked this question in Q&A
Discussion options

You must be logged in to vote

Update, if you're only using docker-compose CLI, or the new docker compose CLI, then versions are now deprecated and the "version" is Compose Spec, which means you can remove the version line from your YAML all together and each feature will determine where it's supported dynamically.

Note that Swarm is still pinned to only work with v3.x, so you'll need the version key/value in YAML if you're using it with that file.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by BretFisher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #12 on August 31, 2021 01:39.