docker-compose 3.8 and the config you can finally version

Compose file 3.8 arrived with 19.03 and its only widely useful addition is a config format the CLI can validate, which is a smaller change than the version number suggests.

version: '3.8'

services:
  php:
    build:
      context: .
      cache_from:
        - registry.internal/app:latest    # 3.2+, used by CI
    deploy:
      resources:
        limits: { cpus: '0.50', memory: 512M }

# and the check that belongs in CI regardless of version
# $ docker-compose config -q

The honest summary of compose file versions is that 3.x has been additive since 3.0 and the version number mostly signals which Docker Engine you need. Bumping it for its own sake is not worth a commit; bumping it because a specific key is required is. The config -q check is what actually prevents the class of problem people expect the version to solve — a malformed file failing at deploy rather than at build.