EX200 Manage containers Practice Question
An administrator needs to run a container with a bind mount of the host directory /data to /var/lib/data inside the container. The container image is web:latest. Which command correctly achieves this?
⚠ Common exam trap
Many candidates confuse the order of paths in the bind mount syntax, incorrectly placing the container path before the host path, or they mistakenly use an invalid flag like `-V` instead of the correct `-v`.
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
✓
podman run -v /data:/var/lib/data web:latest
The `-v` flag in Podman creates a bind mount from the host directory `/data` to the container directory `/var/lib/data`. The syntax `-v /host/path:/container/path` is the standard way to specify a bind mount, and this command correctly maps the host directory to the intended 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.
- ✗
podman run -V /data:/var/lib/data web:latest
Why it's wrong here
The uppercase -V flag is not recognized by podman run; Podman's volume option is case-sensitive and must be written as lowercase -v or the long form --volume. Invoking the command with -V causes Podman to abort with an 'unknown flag' error before any mount is processed. Even though the argument /data:/var/lib/data is correctly ordered, the invalid flag prevents the bind mount from ever being created.
- ✓
podman run -v /data:/var/lib/data web:latest
Why this is correct
Using lowercase -v with the absolute source and destination paths is the correct bind-mount syntax: podman -v /data:/var/lib/data mounts the host directory /data at the container path /var/lib/data. Because /data is an absolute path, Podman treats it as a bind mount rather than creating a named volume. The container's writes to /var/lib/data will be immediately reflected in host's /data, which is exactly the desired behavior.
- ✗
podman run -v /var/lib/data:/data web:latest
Why it's wrong here
This command does not mount the host /data directory; instead, it mounts the host's /var/lib/data at /data in the container. That reverses the required source and destination: container access to /data maps to a different host directory, so any files written to /var/lib/data by the container would not be available at /data on the host. The correct order is host-source first, container-target second, so the data directory on the host is the source.
- ✗
podman run -v /data::/var/lib/data web:latest
Why it's wrong here
The volume specification for -v requires only a single colon between the host path and the container path, with an optional third field after a second colon reserved for mount options. Here, the double colon creates an empty middle field, so Podman reads the source as /data, the destination as empty, and the trailing /var/lib/data as a malformed options string. This invalid syntax is either rejected or mounts to the wrong container path.
Go deeper
Related to this question
About these practice questions
This EX200 question is part of Courseiva's 427-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 EX200 practice question is part of Courseiva's free Red Hat 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 EX200 exam.