How to check file version for docker build?

I would like to make sure that I am using version 3 of the compose file format. However, at https://docs.docker.com/compose/compose-file/ I was unable to figure out how to do this.

My version is Docker 17.04.0-ce, build 4845c56

and my version is Docker-Compose docker-compose version 1.9.0, build 2585387

. I'm not sure since version 3 of the compose file format was introduced. How can I find out?

+3


source to share


2 answers


It's in your file docker-compose.yml

. The first parameter is the Docker Compose version.

version: '3'

      



Docker Compose version 3 file was introduced with Docker Compose 1.10.0 and Docker Engine 1.13.0.

You can see the release notes here for Docker Compose 1.10.0 which introduces the version 3 file: https://github.com/docker/compose/releases/tag/1.10.0

+3


source


Socket syntax version 3 requires docker version 1.13 and docker version 1.10 ( see release notes ). See the release notes for the version compatibility matrix and upgrade instructions.

Note that version 3 syntax is for docker stack deploy

docker roaming mode and it was first supported in docker version 1.13. There aren't many reasons to upgrade to syntax version 3 if you are still using docker-compose

.



See also the compine file versioning page for a description of the differences between the different yml versions.

+1


source







All Articles