Reputation: 57461
I would like to make sure that I'm using version 3 of the compose file format. However, on https://docs.docker.com/compose/compose-file/ I was not able to find out how to do this.
My Docker version is 17.04.0-ce, build 4845c56
, and my Docker-Compose version is docker-compose version 1.9.0, build 2585387
. I'm not sure since when version 3 of the compose file format was introduced, however. How can I find this out?
Upvotes: 19
Views: 54497
Reputation: 263636
The docker compose version 3 syntax requires docker version 1.13 and docker-compose version 1.10 (see the release notes). See the release notes for the version compatibility matrix and upgrade instructions.
Note that the version 3 syntax is designed for docker swarm mode, and it was first supported with the docker stack deploy
in docker release 1.13. There's not much reason to upgrade to the version 3 syntax if you are still using docker-compose
itself.
See also the compose file versioning page that describes the differences between the different yml versions.
Upvotes: 5
Reputation: 5027
It's on your docker-compose.yml
file. First parameter is Docker Compose version.
version: '3'
Docker Compose version file 3 was introduced in release 1.10.0 of Docker Compose and 1.13.0 release of Docker Engine.
Here you can see release notes for Docker Compose 1.10.0 which introduces version file 3: https://github.com/docker/compose/releases/tag/1.10.0
Upvotes: 18