What is the version directive for?
I've read through the docs at: https://docs.docker.com/compose/compose-file/ and find no reference to a directive that seems to be present in all sample docker-compose.yml files I've seen, namely the version is that meant to indicate the version of docker-compose to be used? or is it an arbitrary version number I can assign?
the version in the docker-compose file is describing the Compose file formats and is linked to specific docker engine versions. More info can be found just couple links lower from what you found: https://docs.docker.com/compose/compose-file/compose-versioning/ You cannot specify whatever you want, the current options are: 3.1, 3.0, 2.1, 2.0, 1.0. Each version is also add or deprecating options and enables new docker engine capabilities to be used like swarm in v3.
How to change the config file for Riak TS when using Docker
Django Docker-compose machine does not start web server
How should docker-compose jobs discover etcd?
docker compose adding nodes dynamically to nginx frontend
Docker Swarm - dependencies definition
docker-compose volume not mounted
Exposing sentry service in docker-compose file
Yesod and docker-compose logs in development mode
Docker compose to always deploy using latest image
JHipster - Doubts in the development using Microservices Architecture
Gogs + Drone getsockopt: connection refused
Concourse result keeps loading
Docker-compose: AttributeError: 'module' object has no attribute 'ssl'
scaling a service with docker compose
Docker Compose apparently ignores COMPOSE_FILE
Where does Docker install gems on a mac