200-901 Application Deployment and Security Practice Question
In a Docker Compose file, which key is used to define the dependency order between services?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
depends_on
The depends_on key in Docker Compose allows specifying that one service depends on another, controlling startup order.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
links
Why it's wrong here
The links key creates legacy network aliases between containers and is deprecated; it does not express startup ordering. It tempts because links imply a relationship between services, but Compose orders startup with depends_on, which explicitly declares that one service must start before another.
- ✗
volumes
Why it's wrong here
The volumes key mounts storage into containers; it has no bearing on service startup sequence. It tempts because volumes are a common top-level Compose key, but dependency order is declared with depends_on, which tells Compose to start the referenced service first.
- ✗
networks
Why it's wrong here
The networks key attaches services to Docker networks for connectivity and DNS resolution; it does not order container startup. It tempts because network configuration often appears alongside orchestration settings, but dependency sequencing is expressed through depends_on, which controls start order between services.
- ✓
depends_on
Why this is correct
depends_on declares startup and shutdown ordering between services, so Compose starts the named dependency first. It satisfies the stem's requirement for defining dependency order, unlike links or restart, which govern connectivity or restart behaviour rather than sequencing.
Go deeper
Related to this question
About these practice questions
Courseiva writes every 200-901 question from scratch — 975 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.