XK0-006 Automation, Orchestration, and Scripting Practice Question
A system administrator wants to create a bind mount in Docker to share a host directory `/data` with a container at `/mnt/data`. Which of the following docker run options should be used?
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
✓
-v /data:/mnt/data
Bind mounts are specified with -v or --mount. The -v syntax is host-path:container-path.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
-v /data:/mnt/data
Why this is correct
This creates a bind mount from /data to /mnt/data.
- ✗
--mount type=volume,source=/data,target=/mnt/data
Why it's wrong here
This creates a volume, not a bind mount.
- ✗
-v /data:ro
Why it's wrong here
This mounts /data read-only but does not specify the container mount point.
- ✗
-v /mnt/data:/data
Why it's wrong here
This would mount the container path to the host, which is not the requested direction.
Go deeper
Related to this question
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 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 XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.