Courseiva
Manage containers →mediumMultiple Choice

EX200 Manage containers Practice Question

A containerized web server needs to persist logs outside the container. Which podman run option allows the administrator to specify a bind mount with mount propagation options?

⚠ Common exam trap

Watch out — candidates often confuse `--volume`/`-v` with `--mount`, assuming both support the same options, but only `--mount` allows explicit mount propagation settings, which is a key differentiator tested in the EX200 exam.

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

✓

--mount

The `--mount` flag in `podman run` provides the most granular control over bind mounts, including the ability to specify mount propagation options (e.g., `shared`, `slave`, `private`) via the `propagation` parameter. This is essential for persisting container logs to the host filesystem while controlling how mount events are propagated between the container and the host.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    --mount

    Why this is correct

    The --mount option is the correct choice because it provides an explicit, structured way to define a bind mount with comma-separated key=value syntax, such as type=bind,source=/host/logs,destination=/var/log/nginx. It allows specifying advanced parameters like bind-propagation (e.g., rshared, rslave) and read-only enforcement, which are essential for reliably persisting container logs outside the container. Unlike -v or --volume, --mount does not guess whether the source is a file, directory, or named volume, making it the most deterministic and production-safe approach for this task.

  • ✗

    --volume

    Why it's wrong here

    --volume is the long form of -v and, like its shorthand, accepts key=value pairs such as volume=/host/logs:/var/log/nginx, but it does not support explicit mount propagation or fine-grained control over mount type and read-only settings. When using --volume, Podman infers the mount type based on whether the source exists or contains a slash, which can lead to unexpected behavior if the host path doesn't exist. For a straightforward bind mount it works, but it lacks the explicitness and advanced capabilities of --mount, making it a less reliable option for production persistence.

  • ✗

    --bind

    Why it's wrong here

    There is no --bind option in the podman run command; it is a catch-all flag that does not exist in the Podman or Docker CLI reference. To create a bind mount, you must use --mount type=bind,source=/host/logs,destination=/var/log/nginx or the -v/--volume shorthand. Selecting --bind would immediately result in an error (e.g., unknown flag), so it is not a viable way to persist logs outside the container.

  • ✗

    -v

    Why it's wrong here

    The -v option (shorthand for --volume) is commonly used for volume mounts, but it has significant limitations for advanced persistence scenarios. It automatically creates a directory on the host if the source path does not exist, and it does not allow you to specify mount propagation or explicit bind-mount type. While -v works for simple cases, its implicit behavior and lack of support for propagation options make it unsuitable when you need deterministic, production-grade log persistence; --mount is the safer alternative.

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 →

How Courseiva writes practice questions · Editorial policy

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.