Docker · Option
depends_on
The depends_on attribute controls the order in which Compose starts and removes services. Long syntax can also wait for a dependency to start, become healthy, or complete successfully.
Last updated
- Since
- 2.17.0 for the long-form restart field
Syntax
services:
dependent:
depends_on:
dependency:
condition: service_healthy
restart: trueIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
healthcheckservicesbuildimagenetworks