Docker Compose
docker-compose
- By default, Compose reads two files, a
docker-compose.yml
and an optionaldocker-compose.override.yml
file. By convention, thedocker-compose.yml
contains 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
,command
ormem_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. Forenvironment
andlabels
, 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
version
property is defined by the specification for backward compatibility but is only informative.1
-
https://docs.docker.com/compose/compose-file/#version-top-level-element ↩