Courseiva
hardMultiple Choice

XK0-006 Podman bind mount Practice Question

A DevOps engineer is creating a Podman container that needs to communicate with a host service listening on a Unix socket at /run/host-service.sock. Which of the following mount options will make the socket available inside the container?

⚠ Common exam trap

Candidates may assume only `--volume` can mount files, but `--mount type=bind` also supports file and socket sources. Both C and D are valid.

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

✓

--volume /run/host-service.sock:/run/host-service.sock

Both option C (`--volume`) and option D (`--mount type=bind,source=...,target=...`) can bind-mount a Unix socket into a Podman container. Podman's `--mount` with `type=bind` supports individual file sources, including sockets, just like Docker. The `--volume` flag is a shorthand that also works for files and directories. Options A (`--device`) and B (`--bind`) are not valid Podman flags for this purpose.

Answer analysis

Option-by-option breakdown

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

  • ✗

    --device /run/host-service.sock:/run/host-service.sock

    Why it's wrong here

    Incorrect. `--device` is used for hardware devices, not for mounting files or sockets.

  • ✗

    --bind /run/host-service.sock:/run/host-service.sock

    Why it's wrong here

    Incorrect. `--bind` is not a valid Podman flag; the correct flag is `--mount type=bind`.

  • ✓

    --volume /run/host-service.sock:/run/host-service.sock

    Why this is correct

    Correct. The --volume flag can bind-mount a single file like a Unix socket from the host to the container.

  • ✓

    --mount type=bind,source=/run/host-service.sock,target=/run/host-service.sock

    Why this is correct

    Incorrect. The --mount flag requires a source that is a directory; it cannot bind-mount a single file.

About these practice questions

This XK0-006 question is part of Courseiva's 781-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 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.