Docker Compose
docker-compose
- By default, Compose reads two files, a
docker-compose.ymland an optionaldocker-compose.override.ymlfile. By convention, thedocker-compose.ymlcontains your base configuration. The override file, as its name implies, can contain configuration overrides for existing services or entirely new services.- For single-value options like
image,commandormem_limit, the new value replaces the old value. - For the multi-value options
ports,expose,external_links,dns,dns_search, andtmpfs, Compose concatenates both sets of values. - In the case of
environment,labels,volumes, anddevices, Compose "merges" entries together with locally-defined values taking precedence. Forenvironmentandlabels, the environment variable or label name determines which value is used.
- For single-value options like
Compose Specification
- https://docs.docker.com/compose/compose-file/
- Top-level
versionproperty is defined by the specification for backward compatibility but is only informative.1
-
https://docs.docker.com/compose/compose-file/#version-top-level-element ↩