200-901 Application Deployment and Security Practice Question
A developer runs 'docker-compose up -d' for a multi-service application. What does the '-d' flag do?
⚠ Common exam trap
Cisco often tests the `-d` flag to see if candidates confuse it with debugging (`-d` in some tools like `curl`) or assume it stands for 'delete', when in Docker it specifically means 'detached mode'.
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
✓
It runs containers in detached mode (background)
The `-d` flag in `docker-compose up -d` stands for 'detached mode', which instructs Docker Compose to run the containers in the background, freeing the terminal for other commands. This is analogous to the `-d` flag in `docker run -d` and is essential for long-running services that should not block the command-line session.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
It enables debugging output
Why it's wrong here
The -d flag detaches containers from the terminal; debug output comes from --verbose or log inspection. It is tempting because many CLIs use -d for debug, and Compose does emit verbose diagnostics, but that output is enabled through different flags, leaving -d purely about background execution.
- ✗
It pulls the latest images before starting
Why it's wrong here
The -d flag runs containers detached, returning the terminal to the prompt; image pulling happens separately via docker-compose pull or on first up. It is tempting because Compose does fetch missing images during startup, so the flag appears related, but that behaviour occurs regardless of -d.
- ✗
It deletes the containers after they stop
Why it's wrong here
Detached mode only backgrounds the running containers; removal requires docker-compose down or the --rm flag. It is tempting because -d resembles delete in other command-line tools, and docker-compose down genuinely does stop and remove containers, but that is a distinct subcommand, not this flag.
- ✓
It runs containers in detached mode (background)
Why this is correct
Detached mode starts the services and immediately returns control to the terminal, leaving containers running in the background rather than streaming their logs. This satisfies the stem's requirement to explain what the -d flag does for the multi-service application.
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.