TIL that you declaring version in docker-compose has been deprecated.

[link](https://nickjanetakis.com/blog/docker-tip-51-which-docker-compose-api-version-should-you-use) where i read it

>Update in 2021: The new Docker Compose spec supports not defining a version property and is the recommended way to go moving forward. It supports both v2 and v3 properties.

#

>The Compose file is a YAML file defining version (DEPRECATED), services (REQUIRED), networks, volumes, configs and secrets.

8 thoughts on “TIL that you declaring version in docker-compose has been deprecated.”

  1. At first I was upset but now that I’ve read the link, I like it. I don’t need to make sure the version is correct for the properties I’m setting. Cool.

    Reply
  2. ha. interesting. so but then does this imply we should be using relatively knew version of docker-compose that knows about this?

    Reply
  3. Finally. Having different syntax between the versions just seemed so stupid to me. Backwards compatibility should be maintained

    Reply
  4. It’s a shame that swarm and non-swarm things aren’t inter-compatible yet from what I can see.

    I want secrets already dammit!

    Reply
  5. That’s ok. I still put my name, date, graduation date and major up in the comments at the top of every file I make .

    Except jsons… damn buggers.

    Reply

Leave a Comment