DevOps/Docker/docker compose/Docker compose file: docker-compose.yml

Review different versions of


 * Options: https://docs.docker.com/compose/compose-file/compose-versioning/#versioning

YAML Explained
Version and at least one service is needed. version: "3.7" services: ... volumes: ... networks: ...

Version 3

 * DevOps/Docker/docker compose/Version 3 resource limitation

Removed options:

v3.7 (18.06.0+)
 * in service definitions
 * in deploy configurations
 * Support for extension fields at the root of service, network, volume, secret and config definitions

v3.6 (8.02.0+)
 * tmpfs size for tmpfs-type mounts

v3.5
 * in service definitions
 * for networks, secrets and configs
 * in build configurations

Restart policy
restart_policy: condition: on-failure delay: 5s max_attempts: 3 window: 120s - restart: no|always|on-failure
 * Version 3:
 * Version 2:

logging
driver: none|local|json-file|syslog|journald|gelf|fluentd|awslogs|splunk|etwlogs|gcplogs|logentries
 * https://docs.docker.com/compose/compose-file/#logging
 * json-file is the default option

See also: docker logs: