Courseiva

Red Hat Certified Specialist in Containers (EX188, Podman-based) (EX188) (EX188) — Questions 1–75

264 questions total · 4 pages · All types, answers revealed

Page 1 of 4

Page 2
1
Multi-Selecteasy

Which THREE commands are valid when inspecting or managing Podman storage volumes? (Choose THREE)

Select 3 answers
A.podman volume modify
B.podman volume inspect
C.podman volume rm
D.podman volume create
E.podman volume edit
AnswersB, C, D

`podman volume inspect` returns a volume's configuration as JSON, including its mountpoint, driver, and labels, satisfying the stem's requirement to inspect storage volumes. It queries volume metadata directly rather than container or image state, which is the axis distinguishing volume subcommands from other Podman inspection commands.

Why this answer

Option B, `podman volume inspect`, is correct because it is the standard subcommand for retrieving detailed JSON metadata about a named volume, including its mountpoint, driver, labels, and options. Option C, `podman volume rm`, is correct because it removes one or more volumes from Podman storage, optionally with `--force` to remove volumes in use. Option D, `podman volume create`, is correct because it is the canonical command for creating a new named volume, supporting flags such as `--driver`, `--label`, and `--opt`.

Option A, `podman volume modify`, is not a valid Podman subcommand (unlike `podman volume` operations such as `ls`, `prune`, or `exists`), and Option E, `podman volume edit`, also does not exist; Podman has no built-in volume editing command, so volume attributes must be changed by recreating the volume or using supported flags at creation time.

Exam trap

EX188 often tests the exact set of valid subcommands for Podman volume, so candidates must remember that modify and edit are not supported, while inspect, rm, and create are.

2
MCQmedium

An administrator needs to execute multiple commands in a single RUN instruction to minimize image layers. Which syntax is standard in a Containerfile?

A.RUN ["dnf update -y", "dnf install -y httpd"]
B.RUN { dnf update -y; dnf install -y httpd; }
C.RUN dnf update -y dnf install -y httpd
D.RUN dnf update -y && dnf install -y httpd
AnswerD

Chaining with `&&` executes both commands within one RUN instruction, producing a single image layer and satisfying the layer-minimisation constraint. The shell only proceeds to `dnf install` if `dnf update` succeeds, so failures halt the build rather than silently continuing. This is standard Containerfile syntax.

Why this answer

Combining commands using shell operators like && within a single RUN instruction reduces the total number of layers.

3
MCQmedium

An administrator needs to copy a configuration file named /tmp/nginx.conf from the host into a running container named web_server at path /etc/nginx/nginx.conf. Which command should be used?

A.podman push --target web_server /tmp/nginx.conf
B.podman cp /tmp/nginx.conf web_server:/etc/nginx/nginx.conf
C.podman transfer /tmp/nginx.conf web_server:/etc/nginx/nginx.conf
D.podman import /tmp/nginx.conf web_server:/etc/nginx/nginx.conf
AnswerB

podman cp supports copying from host to container using host_path:container_path syntax.

Why this answer

The podman cp command copies files between the local filesystem and a container's filesystem (or between containers), using the syntax podman cp SRC DEST where a container path is prefixed with the container name and a colon. This mirrors docker cp and is the standard tool for injecting files into a running container. The command podman cp /tmp/nginx.conf web_server:/etc/nginx/nginx.conf correctly places the host file at the target path inside the container.

Exam trap

EX188 often tests confusion between image-level operations (push, import, build) and container-level file operations (cp), so candidates must recognize that only podman cp moves files into a running container.

How to eliminate wrong answers

Option A is wrong because podman push uploads an image to a registry — it has no --target flag and does not copy individual files into containers. Option C is wrong because podman transfer is not a valid Podman subcommand. Option D is wrong because podman import creates an image from a tarball of a filesystem, not a single file, and does not accept a container name as a destination.

4
MCQeasy

How do you disconnect a running container from a custom network named 'mynet'?

A.podman container disconnect mynet mycontainer
B.podman network disconnect mynet mycontainer
C.podman network remove mynet mycontainer
D.podman network detach mynet mycontainer
AnswerB

`podman network disconnect` detaches a running container's network interface from the named network without stopping it, satisfying the stem's requirement to disconnect while the container keeps running. The arguments are ordered network first, then container, matching `mynet` and `mycontainer` exactly as specified.

Why this answer

The `podman network disconnect` command removes a container from a specified network, taking the network name and container name as arguments. This is the exact syntax for detaching a running container from a custom network like 'mynet' without stopping it. It is the counterpart to `podman network connect`.

Exam trap

EX188 often tests whether candidates confuse `podman network remove` (deletes the network) with `podman network disconnect` (detaches a container), or whether they invent a `detach` verb that does not exist.

How to eliminate wrong answers

Option A is wrong because `podman container disconnect` is not a valid subcommand — network operations are grouped under `podman network`, not `podman container`. Option C is wrong because `podman network remove` deletes the entire network (and fails if containers are attached), rather than disconnecting a single container. Option D is wrong because `podman network detach` does not exist; the correct verb is `disconnect`.

5
Multi-Selectmedium

An administrator is troubleshooting a misbehaving container and needs to examine its output logs and event history. Which TWO commands are appropriate for this task? (Choose TWO)

Select 2 answers
A.podman inspect-logs
B.podman logs
C.podman events
D.podman history
E.podman trace
AnswersB, C

podman logs retrieves a container's captured stdout and stderr, satisfying the stem's requirement to examine output logs. It reads the container's logging driver output, unlike podman events, which reports lifecycle actions rather than application output.

Why this answer

Option B, `podman logs`, is correct because it retrieves the stdout/stderr output of a container (or pod), which is exactly what the administrator needs to examine the container's output logs. Option C, `podman events`, is correct because it displays a stream of container-related events (such as create, start, stop, die, and health status changes) along with timestamps, providing the event history the administrator requires. Option A, `podman inspect-logs`, is not a valid Podman subcommand; log inspection is done with `podman logs`, while `podman inspect` returns container metadata, not logs.

Option D, `podman history`, is incorrect because it shows the image layer history (used with `podman history <image>`), not container runtime logs or events. Option E, `podman trace`, is not a real Podman command; there is no such subcommand for tracing container output or events.

Exam trap

EX188 often tests the distinction between image history (podman history) and container logs/events, and may include fabricated commands like podman inspect-logs or podman trace to distract candidates who are not familiar with the actual Podman subcommands.

6
Multi-Selectmedium

You are defining a Podman Compose file for a web application stack. You need to ensure that the 'app' service can communicate with the 'cache' service using the hostname 'cache', and that the 'cache' service is assigned a static IP address 10.89.0.10 on the custom network 'backend'. Which TWO configuration elements must be present in the Compose file? (Choose two.)

Select 2 answers
A.A service-level extra_hosts entry for 'app' that maps 'cache' to 10.89.0.10.
B.A top-level networks section that defines 'backend' with an ipam configuration specifying the subnet 10.89.0.0/24.
C.A service-level dns entry for 'cache' that lists 10.89.0.10 as the nameserver.
D.A top-level networks section that defines 'backend' with driver: bridge and no ipam configuration.
E.A service-level networks section for 'cache' that attaches it to 'backend' and includes an ipv4_address: 10.89.0.10 entry.
AnswersB, E

To assign a static IP, the network must have a defined subnet. The ipam configuration with a subnet provides the address range from which the static IP is drawn. Without this, Podman cannot validate or assign a fixed address, and the static IP setting would be rejected or ignored. This element is therefore required for the scenario.

Why this answer

Static IP assignment in Podman Compose requires the target network to have a defined subnet via an ipam configuration, and the service must specify ipv4_address under its networks mapping. Together, these allow Podman to assign the exact address and register the service name for DNS. Other options either misconfigure DNS or do not provide the required subnet for static addressing.

Exam trap

The trap here is thinking that a static IP can be assigned on any user-defined network without first defining its subnet, or that a DNS nameserver entry achieves the same result.

7
Multi-Selecthard

An administrator is troubleshooting process execution and live configuration updates on a running container. Which TWO commands allow interacting with processes or updating resource limits on the fly? (Choose TWO)

Select 2 answers
A.podman exec-top
B.podman adjust
C.podman update
D.podman modify
E.podman top
AnswersC, E

podman update modifies container resource limits like CPU shares on a running container.

Why this answer

Option C, `podman update`, is correct because it allows an administrator to change resource limits (such as CPU, memory, and pids limits) on an already-running container without restarting it, which directly satisfies the requirement for live configuration updates. Option E, `podman top`, is correct because it displays the running processes inside a container (similar to the Linux `top` command), letting the administrator inspect process execution in real time. The other options do not exist as valid Podman subcommands: `podman exec-top` (A) is not a real command, `podman adjust` (B) is not a real command, and `podman modify` (D) is not a real command, so none of them can be used for this scenario.

Exam trap

EX188 often tests the exact subcommand names for runtime mutation (`update`, not `modify`/`adjust`) and process inspection (`top`, not `exec-top`); candidates invent plausible-sounding verbs that don't exist in Podman.

8
Multi-Selecteasy

Which TWO commands can be used with Podman to build a container image from a Containerfile? (Choose two.)

Select 2 answers
A.podman container build
B.podman image build
C.podman make image
D.podman create build
E.podman build
AnswersB, E

`podman image build` is the fully qualified form of the build command, invoking Buildah's image-building engine to read a Containerfile and produce a local image. It satisfies the stem's requirement for a valid Podman build command, functioning identically to `podman build` but with the explicit `image` subcommand namespace.

Why this answer

podman build and podman image build are both valid commands for building images.

9
MCQeasy

You need to set a persistent environment variable named 'APP_PORT' with the value '8080' inside a container image via the Containerfile. Which instruction should you use?

A.EXPORT APP_PORT=8080
B.ENV APP_PORT=8080
C.VAR APP_PORT=8080
D.SET APP_PORT=8080
AnswerB

ENV sets a persistent environment variable that remains available to processes at build and runtime within the image. Unlike ARG, which applies only during the build, ENV satisfies the requirement for a persistent APP_PORT value of 8080 in the Containerfile.

Why this answer

The ENV instruction in a Containerfile sets a persistent environment variable that is available both during the build and at container runtime. This is the standard Dockerfile/Containerfile directive for environment variables, and it persists in the image metadata. Options like EXPORT, VAR, or SET are not valid Containerfile instructions.

Exam trap

EX188 often tests the difference between build-time ARG and runtime ENV, and candidates mistakenly choose shell commands like EXPORT or non-existent instructions like SET or VAR.

How to eliminate wrong answers

Option A is wrong because EXPORT is a shell command, not a Containerfile instruction; it would not persist in the image. Option C is wrong because VAR is not a Containerfile instruction in any container build specification. Option D is wrong because SET is not a valid Containerfile instruction; it is used in Windows batch scripting, not container builds.

10
MCQmedium

An administrator wants to monitor real-time Podman system events, such as when containers are created, started, stopped, or removed, for auditing purposes. Which command should be executed?

A.podman audit
B.podman system stream
C.podman events
D.podman monitor
AnswerC

podman events streams real-time system events, including container creation, start, stop and removal, which is exactly the auditing visibility required. Other Podman commands list current state rather than a live event stream, so they cannot satisfy the monitoring requirement.

Why this answer

The podman events command streams real-time events from the Podman service, including container create, start, stop, die, and remove actions, along with image and network events. It is the direct analog to 'docker events' and is the correct tool for auditing container lifecycle activity. Options like 'podman audit' and 'podman monitor' do not exist as Podman subcommands.

Exam trap

EX188 often tests the confusion between podman events and non-existent subcommands like 'podman audit' or 'podman monitor', which sound plausible but are not part of the Podman CLI.

How to eliminate wrong answers

Option A is wrong because 'podman audit' is not a valid Podman subcommand; auditing is achieved via podman events or systemd journal integration. Option B is wrong because 'podman system stream' does not exist; the 'podman system' subcommand offers connection, df, info, prune, and reset, but not stream. Option D is wrong because 'podman monitor' is not a Podman command; monitoring is done through podman events, podman stats, or external tools.

11
MCQmedium

An administrator needs to run a PostgreSQL container that stores its database files in a Podman named volume called pgdata, which was created earlier. The container must also have the volume mounted at /var/lib/postgresql/data inside the container. Which command should the administrator use?

A.podman run -d --name pg -v /var/lib/postgresql/data:pgdata -e POSTGRES_PASSWORD=secret postgres:15
B.podman run -d --name pg --volume pgdata:/var/lib/postgresql/data:ro -e POSTGRES_PASSWORD=secret postgres:15
C.podman run -d --name pg -v pgdata:/var/lib/postgresql/data -e POSTGRES_PASSWORD=secret postgres:15
D.podman run -d --name pg --mount type=bind,source=pgdata,destination=/var/lib/postgresql/data -e POSTGRES_PASSWORD=secret postgres:15
AnswerC

This command correctly uses the short -v syntax to mount the named volume pgdata at the container path /var/lib/postgresql/data. The volume name is specified before the colon, and the container path after, which is the standard format for named volumes in Podman. The environment variable sets the database password. This is the simplest and most common way to attach a named volume to a container.

Why this answer

The correct command uses the -v flag to mount the named volume pgdata at the container path /var/lib/postgresql/data. Named volumes are referenced by name, and the short syntax source:destination is the standard way to attach them. The other options either reverse the order, use the wrong mount type, or add a read-only restriction that breaks database functionality.

Exam trap

The trap here is confusing the order of source and destination in the -v flag, where the volume name must precede the container path.

12
MCQeasy

Which subcommand deletes one or more specific named volumes?

A.podman volume drop
B.podman volume rm
C.podman volume delete
D.podman rm volume
AnswerB

podman volume rm removes one or more named volumes by passing their names as arguments, directly satisfying the requirement to delete specific volumes. Other volume subcommands create, inspect or prune volumes, but only rm targets named volumes for deletion.

Why this answer

The correct subcommand to delete one or more named volumes is podman volume rm. This command removes the specified volumes from the system.

Exam trap

EX188 often tests the exact subcommand names, so candidates must remember that 'rm' is used for removing volumes, not 'delete' or 'drop'.

How to eliminate wrong answers

Option A is wrong because podman volume drop is not a valid subcommand. Option C is wrong because podman volume delete is not a valid subcommand; Podman uses rm. Option D is wrong because podman rm volume is not a valid command; rm is used for containers, not volumes.

13
MCQeasy

A system administrator logs into a RHEL 9 server as a regular non-root user and executes 'podman ps'. The command succeeds, but no containers are displayed. What architecture feature enables this user to run containers without root privileges?

A.The Docker daemon running as a system service in user space
B.The systemd-logind setuid binary wrapper
C.Linux user namespaces and subuid/subgid mapping
D.SELinux multi-category security (MCS) translation tables
AnswerC

Rootless Podman relies on Linux user namespaces to map the unprivileged user to a pseudo-root inside the container, with subuid/subgid ranges from /etc/subuid and /etc/subgid enabling that mapping. This is what lets the non-root user run containers without root privileges.

Why this answer

Rootless Podman relies on Linux user namespaces combined with subordinate UID/GID ranges defined in /etc/subuid and /etc/subgid. The user namespace maps the container's root (UID 0) to the unprivileged user's UID on the host, and additional container UIDs map into the allocated subuid/subgid ranges. This lets a non-root user run containers without any setuid daemon.

Exam trap

EX188 often tests rootless architecture, and candidates pick SELinux MCS or a setuid daemon because they assume privilege separation must come from SELinux or a privileged helper rather than user namespaces.

How to eliminate wrong answers

Option A is wrong because Podman is daemonless — there is no Docker daemon, and running a daemon in user space is not what enables rootless operation. Option B is wrong because systemd-logind is not a setuid wrapper for containers; it manages sessions and device access, not container privilege separation. Option D is wrong because SELinux MCS labels provide isolation between containers but do not grant the privilege to run containers as a non-root user — that is the job of user namespaces.

14
MCQhard

You need to inspect the configuration details, including subnet, gateway, and driver, of a custom Podman network named 'appnet'. Which command should you run?

A.podman inspect --network appnet
B.podman network show appnet
C.podman network status appnet
D.podman network inspect appnet
AnswerD

The podman network inspect command outputs the full JSON configuration of the named network, including subnet, gateway and driver details. Appending the network name 'appnet' targets that specific network, satisfying the requirement to examine its configuration.

Why this answer

'podman network inspect <name>' returns detailed JSON configuration for the specified network, including subnet, gateway, driver, IPAM options, and connected containers. This is the correct command to inspect a custom Podman network's configuration details.

Exam trap

EX188 often tests whether candidates confuse 'podman inspect' (containers/images) with 'podman network inspect' (networks), or invent non-existent subcommands like 'network show' or 'network status'.

How to eliminate wrong answers

Option A is wrong because 'podman inspect --network' is not a valid syntax; 'podman inspect' inspects containers or images, and the '--network' flag is not used that way. Option B is wrong because 'podman network show' is not a Podman subcommand. Option C is wrong because 'podman network status' is not a Podman subcommand; network status is not a valid verb.

15
MCQmedium

You are building an image behind a corporate firewall that requires a custom Certificate Authority (CA) certificate to trust internal registries and repositories. How can you add this CA certificate to the build container?

A.TRUST corporate-ca.crt
B.EXPOSE CERT corporate-ca.crt
C.COPY corporate-ca.crt /etc/pki/ca-trust/source/anchors/ RUN update-ca-trust
D.ENV CA_CERT=corporate-ca.crt
AnswerC

Placing the CA in /etc/pki/ca-trust/source/anchors/ and running update-ca-trust regenerates the consolidated trust store, so the container trusts the internal registries and repositories required behind the corporate firewall. This satisfies the stem's custom CA constraint by installing the certificate into the system trust bundle at build time.

Why this answer

Placing the CA certificate in the appropriate system directory (e.g., /etc/pki/ca-trust/source/anchors/ on RHEL/Fedora-based images) and running update-ca-trust is standard.

16
MCQhard

You need to pass sensitive database credentials to a Podman container securely without storing them in plaintext environment variables. Which sequence of commands correctly creates and injects the secret?

A.podman volume create db_pass && podman run --volume db_pass:/run/secrets/pass myapp
B.podman secret create db_pass secret.txt && podman run --env-file secret.txt myapp
C.podman secret create db_pass secret.txt && podman run --secret db_pass,type=mount,target=/run/secrets/pass myapp
D.podman secret add db_pass secret.txt && podman run -e SECRET=db_pass myapp
AnswerC

Podman secrets store credentials encrypted at rest and inject them as tmpfs-mounted files, never as environment variables. The `type=mount` flag writes the secret to `/run/secrets/pass` inside the container, satisfying the requirement to avoid plaintext environment variables while keeping credentials readable only within the container's memory-backed filesystem.

Why this answer

Podman secrets are created with 'podman secret create' and injected into a container using '--secret'. Specifying type=mount and target=/run/secrets/pass mounts the secret as a file inside the container, avoiding plaintext environment variables. This is the secure, supported pattern for delivering credentials to a container.

Exam trap

EX188 often tests whether candidates know the correct Podman secret subcommand is 'create' and that secure injection uses --secret with type=mount rather than environment variables.

How to eliminate wrong answers

Option A is wrong because a volume is not a secret mechanism — it stores data on disk and does not provide the access controls or tmpfs-backed delivery of Podman secrets. Option B is wrong because --env-file reads plaintext environment variables from a file, which is exactly the insecure pattern the question says to avoid. Option D is wrong because 'podman secret add' is not a valid subcommand (it is 'create'), and passing -e SECRET=db_pass only passes the secret's name, not its value.

17
MCQhard

You are building a minimal container image from scratch using 'FROM scratch'. Your statically compiled Go binary fails to execute when the container starts, with a 'file not found' error, even though it was successfully copied into the image. What is the most likely cause?

A.The binary was copied with incorrect permissions; it needs to be made executable with chmod +x during build.
B.The EXPOSE instruction was missing, preventing the binary from binding to network interfaces.
C.The WORKDIR instruction was omitted, preventing Podman from locating the binary.
D.The binary was dynamically linked against glibc or requires system files (like /etc/passwd or /lib64/ld-linux-x86-64.so.2) that are absent in the scratch image.
AnswerD

A scratch image contains no libraries or system files, so a dynamically linked binary cannot resolve its interpreter or glibc dependencies at runtime, producing 'file not found'. Statically compiling the Go binary with CGO disabled removes those external dependencies.

Why this answer

'FROM scratch' is an empty image. If the binary depends on shared libraries (e.g., glibc) or dynamic linkers that exist in the host/build environment but not in scratch, it will fail.

18
MCQmedium

You are configuring a container to consume a Podman secret named db_password. By default, where within the container's file system will this secret be mounted if no destination path is specified?

A./secrets/db_password
B./etc/secrets/db_password
C./run/secrets/db_password
D./var/run/secrets/db_password
AnswerC

Podman mounts secrets under /run/secrets by default, using the secret's name as the filename, so db_password appears at /run/secrets/db_password without any destination flag. This satisfies the stem's constraint of specifying no target path, unlike /etc or /var locations that require explicit configuration.

Why this answer

When a Podman secret is consumed without an explicit destination, Podman mounts it at /run/secrets/<secret-name> inside the container. This mirrors the Docker Swarm convention and uses /run because it is a tmpfs-backed runtime directory, keeping the secret out of the image layers and off persistent storage. Thus db_password appears at /run/secrets/db_password.

Exam trap

EX188 often tests the exact default mount path for secrets, and candidates confuse the Docker Swarm-style /run/secrets with the older /var/run/secrets path or invent /etc/secrets.

How to eliminate wrong answers

Option A is wrong because /secrets is not a Podman default path — it is a user-invented directory that would only exist if explicitly mounted. Option B is wrong because /etc/secrets is not used by Podman; /etc is for persistent config and would defeat the purpose of an ephemeral secret mount. Option D is wrong because although /var/run is traditionally a symlink to /run on RHEL, Podman's documented default is the canonical /run/secrets path, not /var/run/secrets.

19
MCQmedium

What is the primary benefit of utilizing multi-stage builds in Containerfiles?

A.It allows you to produce a final production image containing only the application binary and runtime dependencies, significantly reducing image size and attack surface.
B.It automatically encrypts environment variables stored in the image layers.
C.It bypasses the need for a container registry when sharing images.
D.It speeds up local DNS resolution during container execution.
AnswerA

Multi-stage builds let earlier stages compile and build, while the final stage copies only the binary and required runtime libraries. Build tools, source and caches are excluded, shrinking the production image and reducing its exploitable attack surface.

Why this answer

Multi-stage builds allow developers to use multiple FROM statements, leaving behind build tools and heavy SDKs in earlier stages and keeping production images small and secure.

20
MCQmedium

A container running in rootless mode needs to map a user account on the host to a different user inside the container namespace. Which options configure UID and GID mapping?

A.--userns-map and --groupmap
B.--uidmap and --gidmap
C.--user-namespace-file
D.--map-user and --map-group
AnswerB

The --uidmap and --gidmap flags pass explicit UID and GID translation ranges to the container runtime, mapping host accounts to different identities inside the user namespace. This satisfies the rootless mapping requirement, unlike --userns=keep-id, which preserves the invoking user's identity rather than remapping it.

Why this answer

The --uidmap and --gidmap options are used with podman run to define custom UID and GID mappings between the host and the container user namespace. These flags allow fine-grained control over how host UIDs map to container UIDs, which is essential in rootless mode where the user namespace is already in play. They accept values in the format container_uid:host_uid:count.

Exam trap

EX188 often tests the exact flag names for user namespace mapping — candidates confuse --uidmap/--gidmap with nonexistent flags like --userns-map or --map-user, and the exam includes plausible-sounding distractors.

How to eliminate wrong answers

Option A is wrong because '--userns-map' and '--groupmap' are not valid podman flags; the correct flags are --uidmap and --gidmap. Option C is wrong because '--user-namespace-file' does not exist; while there is a --userns flag (with values like host, keep-id, auto), it does not take a file for mapping. Option D is wrong because '--map-user' and '--map-group' are not podman options; they may sound plausible but are not part of the CLI.

21
MCQhard

An application requires a secret to be exposed as an environment variable inside the container instead of a file mount. Which option achieves this with '--secret'?

A.podman run --secret db_pwd,type=env myapp
B.podman run --secret db_pwd,destination=env myapp
C.podman run --secret db_pwd,target=variable myapp
D.podman run --secret db_pwd,mode=environment myapp
AnswerA

The type=env parameter on --secret injects the secret's value directly as an environment variable inside the container rather than mounting it as a file under /run/secrets. This matches the application's requirement for environment-variable exposure using Podman's native secret handling.

Why this answer

Podman's --secret flag supports a type= option, and type=env exposes the secret as an environment variable inside the container rather than mounting it as a file under /run/secrets. The syntax --secret db_pwd,type=env is the documented form for this behavior. This is useful for applications that read credentials from environment variables (e.g., 12-factor apps) instead of files.

Exam trap

EX188 often tests the distinction between file-mounted secrets (default) and environment-variable secrets (type=env), and candidates confuse the --secret type= key with volume/mount keys like destination, target, or mode.

How to eliminate wrong answers

Option B is wrong because destination= is not a valid key for --secret; destination is used with --mount for volumes, not secrets. Option C is wrong because target= is a mount option (used with --mount type=bind or tmpfs) and is not recognized by --secret. Option D is wrong because mode= controls file permissions (e.g., mode=0400) on the mounted secret file, not whether the secret is exposed as an environment variable.

22
Multi-Selectmedium

An administrator is managing rootless Podman containers as a non-root user and wants to ensure that these containers automatically start upon system boot and persist across reboots using systemd. Which TWO steps or commands are required to accomplish this? (Choose TWO)

Select 2 answers
A.Configure the container restart policy to always using '--restart always' without systemd.
B.Run 'systemctl enable --now podman' with root privileges.
C.Modify the global '/etc/rc.local' script to execute 'podman start' on boot.
D.Run 'loginctl enable-linger <username>' to allow the user's systemd instance to run in the background when not logged in.
E.Generate a user systemd unit file using 'podman generate systemd' and place it in '~/.config/systemd/user/'.
AnswersD, E

Running `loginctl enable-linger <username>` keeps the user's systemd instance alive after logout, so user-scoped units can start at boot without an interactive session. Without lingering, rootless Podman containers defined as user services would only run while that user is logged in, breaking the persist-across-reboot requirement.

Why this answer

Option D is correct because rootless Podman containers run under the non-root user's own systemd instance, and 'loginctl enable-linger <username>' keeps that user manager (systemd --user) running after logout and across reboots, which is required for user services to start at boot without an interactive login. Option E is correct because the supported way to make a rootless container start via systemd is to generate a user unit with 'podman generate systemd' (or a Quadlet) and place it in '~/.config/systemd/user/', then enable it with 'systemctl --user enable --now <unit>'. Option A is not correct because '--restart always' is a Podman-level restart policy that only takes effect while the Podman service/container is running; it does not itself start containers at system boot without systemd integration.

Option B is not correct because enabling the system-wide 'podman' service with root privileges does not manage a non-root user's rootless containers. Option C is not correct because '/etc/rc.local' is a legacy system-wide boot script and does not properly integrate with the user's systemd instance for rootless containers.

Exam trap

EX188 often tests the misconception that '--restart always' alone is sufficient for rootless containers to start on boot; candidates must remember that lingering and systemd user units are required for persistence.

23
MCQmedium

An engineer needs to mount a host directory using the advanced '--mount' syntax instead of '-v'. Which syntax correctly specifies a bind mount?

A.podman run --mount /host/path:/container/path:bind myapp
B.podman run --mount source=/host/path,target=/container/path myapp
C.podman run --mount bind:/host/path:/container/path myapp
D.podman run --mount type=bind,source=/host/path,destination=/container/path myapp
AnswerD

The `--mount` flag requires explicit key-value pairs, so `type=bind` declares a bind mount rather than a named volume or tmpfs. `source` and `destination` map the host directory to the container path, satisfying the stem's demand for correct advanced syntax. The comma-separated form is parsed without ambiguity, unlike `-v` shorthand.

Why this answer

The advanced --mount syntax uses comma-separated key=value pairs, and for a bind mount you must specify type=bind, source=<host path>, destination=<container path>. Option D is the only one that follows this exact syntax.

Exam trap

EX188 often tests the syntax difference between -v (colon-separated) and --mount (key=value) — candidates mix the two and forget that --mount requires an explicit type= parameter.

How to eliminate wrong answers

Option A is wrong because it uses colon-separated positional syntax (the -v style) with --mount, which --mount does not accept. Option B is wrong because it omits type=bind, so Podman cannot determine the mount type. Option C is wrong because it uses 'bind:/host/path:/container/path', which is not valid --mount syntax — the type must be a key=value pair, not a positional prefix.

24
MCQhard

An administrator needs to configure system-wide registry search shortcuts so that developers can run 'podman pull rhel9' and Podman automatically expands it to 'registry.access.redhat.com/rhel9'. Which configuration file and parameter accomplish this?

A./etc/containers/registries.conf using the unqualified-search-registries parameter
B./etc/sysconfig/podman using the SEARCH_REGISTRIES variable
C./etc/containers/registries.d/default.yaml using the search-domains parameter
D.~/.config/containers/auth.json using the default-registry key
AnswerA

The `unqualified-search-registries` parameter in `/etc/containers/registries.conf` lists registries that Podman queries when an image name lacks a registry hostname. Adding `registry.access.redhat.com` there makes `podman pull rhel9` resolve to `registry.access.redhat.com/rhel9`, satisfying the system-wide shortcut requirement for all developers.

Why this answer

The /etc/containers/registries.conf file contains the unqualified-search-registries parameter, which lists registries to search when a user pulls an image without specifying a registry. Adding registry.access.redhat.com to this list allows podman pull rhel9 to automatically expand to registry.access.redhat.com/rhel9.

Exam trap

EX188 often tests the location and parameter name for registry search configuration, and may include plausible but incorrect files like /etc/sysconfig/podman or parameters like SEARCH_REGISTRIES to distract candidates who are not familiar with the containers-registries.conf format.

How to eliminate wrong answers

Option B is wrong because /etc/sysconfig/podman and the SEARCH_REGISTRIES variable are not part of Podman's configuration; Podman uses registries.conf. Option C is wrong because /etc/containers/registries.d/default.yaml is used for configuring signature verification and registry-specific settings, not search domains; the parameter search-domains does not exist there. Option D is wrong because ~/.config/containers/auth.json stores authentication credentials for registries, not search shortcuts; the default-registry key is not used for this purpose.

25
MCQhard

An administrator needs to connect an already running container named 'web1' to an existing user-defined network named 'backend-net' without restarting the container. Which command accomplishes this?

A.podman network attach backend-net web1
B.podman network connect backend-net web1
C.podman container modify --network backend-net web1
D.podman network join --container web1 backend-net
AnswerB

The podman network connect subcommand attaches a running container to an existing user-defined network at runtime, requiring no container restart or recreation. It satisfies the constraint of connecting web1 to backend-net while the container keeps running.

Why this answer

The podman network connect command attaches a running container to an existing user-defined network without requiring a restart. Its syntax is 'podman network connect <network> <container>', which matches option B. This is the supported way to add a live container to an additional network, and Podman updates the container's DNS and interfaces dynamically.

Exam trap

EX188 often tests the exact subcommand name — candidates may guess 'attach' or 'join' instead of the correct 'connect', or confuse it with 'podman network create'.

How to eliminate wrong answers

Option A is wrong because 'podman network attach' is not a valid subcommand; the correct verb is connect. Option C is wrong because 'podman container modify' does not exist; container modification is done via 'podman update' for resources, and network changes use network connect/disconnect. Option D is wrong because 'podman network join' is not a valid subcommand, and the syntax shown is incorrect.

26
Multi-Selectmedium

Which TWO instructions can be used to copy files or directories from a build context into a container image?

Select 2 answers
A.PULL
B.INSTALL
C.COPY
D.ADD
E.GET
AnswersC, D

COPY transfers files or directories from the build context into the image filesystem, without ADD's URL fetching or tar auto-extraction. It satisfies the stem's requirement for an instruction that copies build-context content into the container image.

Why this answer

The COPY instruction is correct because it copies files or directories from the build context (or a stage in a multi-stage build) into the image filesystem, with the syntax COPY <src>... <dest>, and it performs no automatic extraction or remote URL fetching. The ADD instruction is also correct because it likewise copies files or directories from the build context into the image, and additionally supports remote URLs and auto-extraction of local tar archives, though for plain copying COPY is preferred. PULL is not a Dockerfile instruction for transferring build-context files into an image; it describes fetching an image from a registry (docker pull).

INSTALL is not a Dockerfile instruction; package installation is done via RUN with a package manager such as apt-get or yum. GET is not a Dockerfile instruction for copying build-context content into an image.

Exam trap

EX188 often tests the distinction between COPY and ADD, and candidates may forget that both can copy files, but only ADD has extra features; they might incorrectly exclude COPY or include invalid instructions like PULL.

27
MCQeasy

A container needs to be created that shares the host's network stack entirely, bypassing any NAT or virtual interface overhead. Which Podman flag achieves this?

A.--share-net
B.--publish host
C.--network host
D.--net bridge
AnswerC

Using --network host places the container directly in the host's network namespace, so it shares the host stack with no NAT or virtual interface. This satisfies the stem's requirement to bypass that overhead entirely, unlike bridge or slirp4netns modes.

Why this answer

Using --network host disables network isolation and places the container directly on the host's network namespace.

28
MCQeasy

A developer runs a container with 'podman run -d --name web -p 8080:80 nginx' on a host that already has a service listening on port 8080. The container starts but clients cannot reach the containerized web server on that port. Which command most directly reveals why the port mapping failed?

A.ss -ltnp | grep 8080
B.podman logs web
C.podman port web
D.podman inspect web
AnswerA

'ss -ltnp' shows listening TCP sockets with the owning process, so filtering for port 8080 identifies exactly which host process already holds that port. This directly confirms the conflict that prevented Podman from binding the requested host port, giving the administrator the information needed to stop or move the competing service before retrying the container.

Why this answer

A published port fails to bind when another process already holds the host port. The most direct diagnostic is to list listening sockets and their owning processes, which identifies the conflicting service on port 8080. Container-side tools such as logs, port, or inspect describe the container's configuration or output, not the host socket that is occupying the requested port.

Exam trap

The trap here is reaching for container inspection commands to diagnose a host-side port conflict, when the failure actually occurs at the host socket layer before the container is reachable.

29
MCQmedium

A container named db_master was previously paused using podman pause. Which command should the administrator use to resume its execution?

A.podman start db_master
B.podman resume db_master
C.podman unpause db_master
D.podman thaw db_master
AnswerC

Pausing a container with podman pause freezes its processes via the cgroup freezer without stopping them. The paired subcommand podman unpause thaws that same cgroup, resuming execution from the exact frozen state, so it is the only command that restores db_master.

Why this answer

The `podman pause` command suspends all processes in a container using the cgroup freezer. To resume execution, the correct command is `podman unpause`, which unfreezes the cgroup and allows processes to continue. Option C is the only command that reverses the paused state.

Exam trap

EX188 often tests the distinction between pausing and stopping containers, and candidates may confuse `podman unpause` with `podman start` or invent commands like `resume` or `thaw`.

How to eliminate wrong answers

Option A is wrong because `podman start` is used to start a stopped container, not to resume a paused one; a paused container is still running but frozen. Option B is wrong because `podman resume` is not a valid Podman command. Option D is wrong because `podman thaw` is not a valid Podman command; the correct term is 'unpause'.

30
MCQmedium

A user is running rootless Podman and needs to verify why a container cannot bind to TCP port 80. By default, unprivileged users cannot bind to ports below 1024. Which parameter controls the minimum unprivileged port that can be bound?

A.user.max_user_namespaces
B.net.ipv4.tcp_port_range
C.fs.inotify.max_user_watches
D.net.ipv4.ip_unprivileged_port_start
AnswerD

The sysctl parameter net.ipv4.ip_unprivileged_port_start defines the lowest port number an unprivileged user may bind. Lowering it below 80 lets rootless Podman containers bind TCP port 80 without elevated privileges, directly resolving the binding failure described.

Why this answer

The sysctl parameter net.ipv4.ip_unprivileged_port_start defines the lowest port number that unprivileged (non-root) users are permitted to bind. By default it is set to 1024, which is why rootless Podman containers cannot bind to port 80. Lowering this value (e.g., to 80 or 0) allows unprivileged processes to bind to lower ports.

Exam trap

EX188 often tests the confusion between kernel parameters that control resource limits (namespaces, inotify watches) and those that govern network port privileges, so candidates must recognize that only net.ipv4.ip_unprivileged_port_start directly affects unprivileged port binding.

How to eliminate wrong answers

Option A is wrong because user.max_user_namespaces limits the number of user namespaces a user can create, not port binding privileges. Option B is wrong because net.ipv4.tcp_port_range defines the ephemeral port range for outbound connections, not the privileged port threshold. Option C is wrong because fs.inotify.max_user_watches controls the number of inotify file watches, unrelated to network port binding.

31
Multi-Selecthard

Which TWO options can be specified when mounting a Podman secret into a container? (Choose TWO)

Select 2 answers
A.type=env
B.type=volume
C.type=tmpfs
D.type=mount
E.type=bind
AnswersA, D

type=env injects the secret's value directly into the container as an environment variable, readable by processes via standard environment lookups. This satisfies the scenario's requirement for a valid Podman secret mounting option, though environment variables are more readily exposed through process inspection than file-mounted secrets.

Why this answer

Option A (type=env) is correct because Podman secrets support being exposed to a container as environment variables, which is selected with the type=env mount option (e.g., podman run --secret mysecret,type=env). Option D (type=mount) is correct because the default and explicitly supported way to inject a secret is as a file mounted into the container's filesystem, specified with type=mount (e.g., --secret mysecret,type=mount). The remaining options do not belong: type=volume, type=tmpfs, and type=bind are not valid secret type values for Podman secrets — tmpfs and bind are storage/mount concepts used elsewhere (e.g., --mount type=tmpfs or type=bind), and volume is a storage driver concept, none of which are accepted as the secret type parameter.

Exam trap

EX188 often tests whether candidates confuse Podman secret types (mount, env) with unrelated storage concepts like volume, tmpfs, or bind — the exam expects you to know that only mount and env are valid for --secret.

32
MCQhard

An administrator wants to view real-time container lifecycle events across the entire Podman system, such as container creation, starting, and stopping. Which command should be executed?

A.podman monitor --stream
B.podman events
C.podman logs --follow --events
D.podman system trace
AnswerB

`podman events` streams real-time lifecycle events from the Podman service, reporting actions such as create, start, stop and die for every container on the system. It satisfies the stem's requirement for system-wide, real-time monitoring, unlike `podman ps`, which only lists current container state.

Why this answer

The podman events command streams real-time container lifecycle events from the Podman system, including create, start, stop, die, and remove actions across all containers. It is the direct analog of docker events and is the correct tool for monitoring system-wide container activity.

Exam trap

EX188 often tests whether candidates confuse podman events (system-wide lifecycle stream) with podman logs (per-container stdout/stderr), and whether they invent plausible-sounding but non-existent subcommands like monitor or system trace.

How to eliminate wrong answers

Option A is wrong because podman monitor is not a valid Podman subcommand — no such command exists. Option C is wrong because podman logs --follow streams stdout/stderr from a single container and does not accept an --events flag; it cannot show system-wide lifecycle events. Option D is wrong because podman system trace is not a real subcommand — podman system has subcommands like df, info, prune, and events, but not trace.

33
MCQeasy

Which environment file option can be used in a Podman Compose file to automatically load environment variables for service configuration?

A.environment_source
B.variables_file
C.env_file
D.load_env
AnswerC

The env_file directive names a file whose KEY=VALUE lines Podman Compose reads and injects as environment variables into the service container at creation, satisfying the requirement to load configuration automatically rather than declaring each variable inline under environment.

Why this answer

In Podman Compose (and Docker Compose), the env_file key within a service definition specifies one or more files containing environment variables in KEY=VALUE format that are loaded into the container at runtime. This is the standard, documented way to inject environment variables from a file rather than listing them inline under environment:. Podman Compose implements this key for compatibility with the Compose specification.

Exam trap

EX188 often tests confusion between similarly named keys like env_file, environment, and non-existent options such as variables_file or load_env, so candidates must recall the exact Compose specification key.

How to eliminate wrong answers

Option A is wrong because environment_source is not a valid Compose key — it does not exist in the Compose specification or Podman Compose implementation. Option B is wrong because variables_file is not a recognized Compose directive; the correct key is env_file. Option D is wrong because load_env is not a Compose key; environment variables are loaded via env_file or the environment mapping, not load_env.

34
MCQhard

An administrator needs to view the processes running inside a specific container named worker_node, along with custom ps options like -ef to see full command arguments. Which command accomplishes this?

A.podman ps --processes worker_node
B.podman exec worker_node ps -ef
C.podman inspect --processes worker_node
D.podman top worker_node -ef
AnswerD

podman top runs ps inside a running container, and arguments after the container name pass through to ps, so -ef returns every process with full command lines. Docker-style exec would need an explicit ps invocation.

Why this answer

podman top runs a ps-like command inside the container's PID namespace and accepts custom ps arguments, so 'podman top worker_node -ef' shows all processes with full command lines. This is the purpose-built command for inspecting in-container processes with tailored output.

Exam trap

EX188 often tests whether candidates reach for 'podman exec ... ps' out of habit, ignoring that podman top is the native, dependency-free way to list in-container processes with custom ps options.

How to eliminate wrong answers

Option A is wrong because 'podman ps --processes' is not a valid flag — podman ps lists containers, not their internal processes. Option B is wrong because 'podman exec worker_node ps -ef' requires ps to be installed inside the container image, which minimal images (e.g., distroless, scratch-based) lack, and it spawns a new process rather than using Podman's native inspection. Option C is wrong because 'podman inspect --processes' is not a valid flag — inspect returns JSON metadata, not a process listing.

35
Multi-Selecthard

Which THREE statements correctly describe the differences between CMD and ENTRYPOINT in a Containerfile?

Select 3 answers
A.ENTRYPOINT instructions cannot be overridden at runtime under any circumstances.
B.Combining ENTRYPOINT and CMD allows default arguments to be supplied while retaining override flexibility.
C.ENTRYPOINT allows configuring an image that runs as a specific dedicated executable.
D.CMD arguments can be easily overridden by arguments passed to 'podman run'.
E.CMD and ENTRYPOINT perform identical functions with no syntactical differences.
AnswersB, C, D

ENTRYPOINT fixes the executable, while CMD supplies default arguments that a user can override at runtime by appending values to `podman run`. This pairing satisfies the stem's requirement for defaults with override flexibility, unlike CMD alone, which is fully replaced when arguments are passed.

Why this answer

Option B is correct because when both ENTRYPOINT and CMD are used together, CMD supplies default arguments to the ENTRYPOINT executable, and those defaults can still be replaced by arguments passed at runtime to podman run. Option C is correct because ENTRYPOINT is specifically designed to set the image's main executable, making the container behave like a dedicated command such as /usr/bin/httpd or a custom application binary. Option D is correct because CMD provides defaults that are easily overridden: any arguments appended to podman run replace the CMD instruction entirely.

Option A is incorrect because ENTRYPOINT can be overridden at runtime using podman run --entrypoint. Option E is incorrect because CMD and ENTRYPOINT serve different roles and have distinct syntax and behavior, especially regarding how runtime arguments interact with them.

Exam trap

EX188 often tests the misconception that ENTRYPOINT is immutable or that CMD and ENTRYPOINT are interchangeable, when in fact ENTRYPOINT can be overridden with --entrypoint and CMD only supplies defaults.

36
MCQeasy

Which flag allows you to publish a container port to a random ephemeral port on the host interface?

A.-p random
B.-p 0:8080
C.--port dynamic
D.-P
AnswerD

The uppercase -P flag publishes the container's exposed port to a randomly assigned ephemeral port on the host, whereas lowercase -p requires an explicit host-to-container mapping. This suits scenarios where the specific host port is irrelevant.

Why this answer

The -P (uppercase) flag tells podman to publish all EXPOSED ports from the image to randomly assigned ephemeral ports on the host. This is the documented shorthand for --publish-all, and it satisfies the requirement of mapping to a random host port without specifying a fixed number. Lowercase -p requires explicit port mappings and does not have a 'random' keyword.

Exam trap

EX188 often tests the case-sensitivity of podman flags — candidates confuse -p (explicit publish) with -P (publish all exposed ports to random host ports), and the exam deliberately includes plausible-sounding but nonexistent flags like 'random' or 'dynamic'.

How to eliminate wrong answers

Option A is wrong because '-p random' is not valid syntax; -p expects a port mapping in the form hostPort:containerPort or containerPort. Option B is wrong because '-p 0:8080' would attempt to bind host port 0, which is not a valid user-specified port and does not represent the documented ephemeral-port behavior. Option C is wrong because '--port dynamic' is not a podman flag at all; there is no such option.

37
Multi-Selectmedium

Which TWO of the following instructions in a Containerfile can be written using either the shell form or the exec form?

Select 2 answers
A.WORKDIR
B.RUN
C.FROM
D.CMD
E.ENV
AnswersB, D

RUN accepts both forms: shell form executes via `/bin/sh -c`, while exec form runs the command directly without a shell. This satisfies the stem's requirement for instructions supporting either syntax, since RUN genuinely permits both, unlike CMD or ENTRYPOINT where the distinction affects signal handling and argument passing.

Why this answer

Option B (RUN) is correct because the RUN instruction supports both the shell form (e.g., RUN apt-get update) and the exec form (e.g., RUN ["apt-get", "update"]), allowing either a shell command string or a JSON array of executable and arguments. Option D (CMD) is correct because CMD likewise accepts both forms: the shell form (CMD echo hello) and the exec form (CMD ["echo", "hello"]), with the exec form being the preferred default-command syntax. Option A (WORKDIR) is not correct because it takes only a plain path argument (WORKDIR /app) and has no exec/shell form distinction.

Option C (FROM) is not correct because it specifies an image reference and optional stage name (FROM alpine:3.19 AS build) with no shell or exec form. Option E (ENV) is not correct because it sets variables using key=value syntax (ENV KEY=value) and does not offer an exec-form JSON array variant.

Exam trap

EX188 often tests the misconception that all Containerfile instructions support both shell and exec forms, but only RUN, CMD, and ENTRYPOINT do; candidates may incorrectly include WORKDIR or ENV.

38
Multi-Selectmedium

You are reviewing a Containerfile for a web application. The Containerfile currently uses the shell form for its ENTRYPOINT instruction. You want to ensure that the application receives signals correctly and that arguments passed to `podman run` are properly forwarded to the application. Which TWO changes should you make? (Choose two.)

Select 2 answers
A.Change the ENTRYPOINT instruction to use the exec form (JSON array).
B.Use the VOLUME instruction to declare a directory for application data.
C.Use the CMD instruction to provide default arguments to the ENTRYPOINT.
D.Add a HEALTHCHECK instruction to monitor the application.
E.Add a SHELL instruction to set /bin/bash as the default shell.
AnswersA, C

The exec form runs the executable directly without a shell, allowing it to receive signals like SIGTERM from Podman and forward arguments correctly. This is critical for graceful shutdown and proper argument handling. The shell form wraps the command in /bin/sh -c, which can interfere with signal propagation and argument forwarding, so switching to exec form is a best practice.

Why this answer

To ensure proper signal handling and argument forwarding, the ENTRYPOINT should use the exec form, which runs the process directly without a shell wrapper. Additionally, using CMD to provide default arguments allows runtime arguments to override them, ensuring they are passed to the application. Together, these changes make the container behave correctly when receiving signals and arguments.

Exam trap

The trap here is assuming that the shell form of ENTRYPOINT can handle signals and arguments as well as the exec form, when the shell wrapper can swallow signals and complicate argument passing.

39
MCQeasy

An administrator needs to start a container named webapp from the image docker.io/library/httpd in the background. Which podman command should be used?

A.podman run -d --name webapp docker.io/library/httpd
B.podman up -d --name webapp docker.io/library/httpd
C.podman container create -d --name webapp docker.io/library/httpd
D.podman start -d docker.io/library/httpd --name webapp
AnswerA

The -d flag detaches the container so it runs in the background, and --name webapp assigns the required container name. Specifying docker.io/library/httpd as the image pulls and starts it, satisfying both the naming and background constraints in one command.

Why this answer

The correct command is 'podman run -d --name webapp docker.io/library/httpd'. The 'run' subcommand creates and starts a container in one step, '-d' detaches it to run in the background, and '--name' assigns the container name. The image reference follows the options.

Exam trap

EX188 often tests confusion between 'podman run' (create+start) and 'podman create'/'podman start' (separate steps), or mistakenly using Docker Compose syntax like 'up'.

How to eliminate wrong answers

Option B is wrong because 'podman up' is not a valid Podman subcommand — 'up' belongs to Docker Compose/Podman Compose, not the podman CLI. Option C is wrong because 'podman container create' only creates the container without starting it, and the '-d' flag is not valid for create in that context; you would need a separate 'podman start'. Option D is wrong because 'podman start' starts an existing, already-created container and does not accept an image name or the '-d' flag in that form.

40
MCQeasy

Which instruction documents the network ports on which a container listens at runtime?

A.LISTEN
B.EXPOSE
C.PORT
D.OPEN
AnswerB

EXPOSE documents the network ports a container listens on at runtime, functioning as metadata for image consumers and tooling. It satisfies the stem's requirement for declaring listening ports, unlike RUN or CMD, which execute commands rather than record port information.

Why this answer

The EXPOSE instruction in a Containerfile documents the network port(s) the containerized application listens on at runtime. It is metadata only — it does not actually publish the port to the host; that requires -p or -P at podman run time. EXPOSE is the standard OCI/Dockerfile directive for this purpose and is what tools like podman inspect read to report exposed ports.

Exam trap

EX188 often tests the confusion between EXPOSE (build-time documentation of a port) and -p/-P (runtime publishing), catching candidates who think EXPOSE actually opens the port on the host.

How to eliminate wrong answers

Option A is wrong because LISTEN is not a valid Containerfile instruction — it is a SQL/network socket concept, not an image build directive. Option C is wrong because PORT is not a Containerfile instruction; port mapping is done at runtime with -p, not declared with a PORT keyword. Option D is wrong because OPEN is not a Containerfile instruction and has no meaning in image builds.

41
Multi-Selecteasy

Which TWO actions can an administrator take to manage container image tags in local Podman storage? (Choose two.)

Select 2 answers
A.Use 'podman rmi' to remove a specific image tag from local storage.
B.Use 'podman push --tag' to rename images remotely.
C.Use 'podman rename' to change an image tag.
D.Use 'podman tag' to assign a new name or tag to an existing local image ID.
E.Use 'podman commit --tag' to tag running containers during creation.
AnswersA, D

'podman rmi' accepts a tag reference and deletes that specific tag from local storage, removing only the named reference while the underlying image layers remain if other tags still point to them. This satisfies the stem's requirement for managing tags in local Podman storage.

Why this answer

Option A is correct because 'podman rmi' removes images from local storage, and when given a tag reference (e.g., 'podman rmi myimage:oldtag') it deletes that specific tag; if it is the last tag on the image, the underlying image is also removed. Option D is correct because 'podman tag' creates an additional name/tag pointing to an existing local image ID (e.g., 'podman tag IMAGE_ID repo/name:newtag'), which is the standard way to assign a new tag without rebuilding or pushing. Option B is wrong because 'podman push --tag' does not exist as a rename mechanism; push transfers an image to a registry and does not manage local tags.

Option C is wrong because 'podman rename' renames containers, not images, so it cannot change an image tag. Option E is wrong because 'podman commit' creates a new image from a container's changes and does not accept a '--tag' flag for tagging during creation.

Exam trap

EX188 often tests whether candidates confuse container renaming (podman rename) with image tagging (podman tag), or assume push/commit can rename local tags.

42
MCQhard

An administrator is troubleshooting container startup failures and wants to inspect the exact entrypoint and command arguments configured for a container named app_run before it starts. Which inspect format expression retrieves this?

A.podman ps --format='{{.Command}}' app_run
B.podman inspect --format='{{.State.Command}}' app_run
C.podman inspect --format='{{.Config.Entrypoint}} {{.Config.Cmd}}' app_run
D.podman inspect --format='{{.Args}}' app_run
AnswerC

The `--format` flag with Go template syntax extracts exactly the `Config.Entrypoint` and `Config.Cmd` fields from the container's image configuration, satisfying the requirement to inspect entrypoint and command arguments without starting the container. This targets the precise metadata fields rather than the full JSON output.

Why this answer

The correct inspect format expression uses '.Config.Entrypoint' and '.Config.Cmd' to retrieve the entrypoint and command arguments configured for the container. These fields are part of the container's configuration and reflect the image's defaults or overrides specified at runtime.

Exam trap

EX188 often tests the correct JSON path for container configuration; candidates may incorrectly use .State.Command or .Args instead of .Config.Entrypoint and .Config.Cmd.

How to eliminate wrong answers

Option A is wrong because 'podman ps --format='{{.Command}}'' only shows the command of running containers and does not display the entrypoint; it also does not work for stopped containers. Option B is wrong because '.State.Command' is not a valid field; the state does not contain command information. Option D is wrong because '.Args' is not a valid field in the inspect output; the correct fields are under .Config.

43
Multi-Selecthard

A security-conscious administrator runs a rootless Podman container that must bind-mount a directory from the host. The container process is denied access to the files even though the directory has world-readable permissions, and SELinux is enforcing. Which TWO steps will resolve the denial while keeping SELinux enforcing? (Choose two.)

Select 2 answers
A.Change the host directory's SELinux type to container_file_t with semanage fcontext and restorecon.
B.Add the :Z option to the volume mount so Podman relabels the host directory with a container-specific SELinux type.
C.Run the container with --security-opt label=disable to remove SELinux confinement from the container.
D.Set the container to run with --privileged so it bypasses SELinux checks on the mounted files.
E.Use a bind mount with the :ro option so SELinux treats the mount as read-only and permits access.
AnswersA, B

Persistently setting the directory's default context to container_file_t and applying it with restorecon makes the host path compatible with container access under SELinux enforcement. This is appropriate when the directory is dedicated to container use, and it does not require disabling SELinux or weakening the confinement of the container.

Why this answer

SELinux denials for bind mounts occur because the host directory retains a type that the container process is not allowed to access. Relabeling the path with :Z for a private container label, or persistently setting the path's type to container_file_t and applying it, aligns the SELinux context with the container's policy. Both solutions preserve enforcing mode and avoid disabling confinement.

Exam trap

The trap here is assuming that world-readable filesystem permissions are sufficient and overlooking that SELinux type enforcement blocks access independently of standard Unix permissions.

44
MCQhard

You want a Podman Compose service to accept connections from other containers on the same Compose network but not from the host, and you do not want the host to be able to reach the service's port. Which Compose configuration achieves this while keeping the service reachable by name within the network?

A.Add 'internal: true' to the service definition and map the port normally with 'ports:'.
B.Set 'network_mode: none' on the service and rely on the Compose network for name resolution.
C.Use 'expose:' to declare the container port without a 'ports:' mapping, and attach the service to the Compose network.
D.Use 'ports:' with the host IP set to 127.0.0.1, for example '127.0.0.1:5432:5432'.
AnswerC

'expose' documents and opens the container port for the Compose network without publishing it to the host, so sibling containers can reach the service by its name and port while the host has no listener for it. Attaching the service to the shared network provides the DNS name resolution. This matches the requirement of internal-only reachability without host exposure.

Why this answer

Declaring the container port with 'expose' while attaching the service to the Compose network lets other containers on that network reach the service by name, because no host-side listener is created. Publishing the port, even on loopback, would still make it reachable from the host, and disabling networking entirely would break intra-network connectivity. The internal-only requirement is met by exposing rather than publishing.

Exam trap

The trap here is treating 'expose' as equivalent to 'ports', when 'expose' only opens the port inside the container network and creates no host listener at all.

45
MCQmedium

You wish to connect an already running container to an existing custom Podman network named 'mynet'. Which command should you use?

A.podman network attach mynet mycontainer
B.podman container network-add mynet mycontainer
C.podman network connect mynet mycontainer
D.podman network join mynet mycontainer
AnswerC

The podman network connect subcommand attaches an already running container to an existing network, taking the network name then the container. This satisfies the requirement to join 'mynet' without recreating the container, unlike podman run --network, which only applies at creation.

Why this answer

'podman network connect' attaches a running or stopped container to a specified network.

46
MCQmedium

A developer needs to push a locally built image to a private registry that requires authentication. The registry uses a self-signed certificate, and the developer wants Podman to trust that certificate for this registry only. Which action should be taken?

A.Import the certificate with update-ca-trust and restart the podman.socket service.
B.Set tls-verify=false in the [[registry]] section for that registry in /etc/containers/registries.conf.
C.Copy the registry's CA certificate into /etc/containers/certs.d/<registry-host>:<port>/ and run podman login again.
D.Add the registry to the unqualified-search-registries list in /etc/containers/registries.conf.
AnswerC

Podman reads per-registry certificate files from /etc/containers/certs.d/<registry-host>:<port>/. Placing the CA certificate there allows Podman to trust the self-signed certificate for that specific registry during login and push operations, without modifying the system-wide trust store or disabling TLS verification.

Why this answer

Podman supports per-registry certificate directories under /etc/containers/certs.d. Placing the CA certificate in a directory named for the registry host and port allows Podman to trust the self-signed certificate for that registry alone. This avoids disabling TLS verification and avoids modifying the system-wide trust store, keeping the configuration scoped and secure.

Exam trap

The trap here is assuming that system-wide CA trust or a global tls-verify setting is required, when Podman provides a per-registry certificate directory that is more precise.

47
Multi-Selecteasy

Which TWO commands allow a user to remove unwanted items from local Podman storage? (Choose two.)

Select 2 answers
A.podman container clear
B.podman rmi
C.podman prune-all
D.podman rm
E.podman image delete
AnswersB, D

Removes locally stored images from Podman's storage, freeing disk space and clearing unwanted container images. The rmi subcommand targets image removal specifically, satisfying the requirement to delete items held in local storage rather than containers or volumes.

Why this answer

Option B, `podman rmi`, is correct because it removes one or more images from local Podman storage, deleting the image layers and metadata from the local image store. Option D, `podman rm`, is correct because it removes one or more containers from local Podman storage, cleaning up stopped containers that are no longer wanted. Both commands directly target unwanted local objects (images and containers respectively) and are the standard Podman subcommands for deletion.

Option A, `podman container clear`, is not a valid Podman subcommand, so it cannot remove anything. Option C, `podman prune-all`, is not a real Podman command; pruning is done via `podman system prune` or `podman image prune`/`podman container prune`. Option E, `podman image delete`, is not a valid Podman subcommand; image deletion is performed with `podman rmi` (or `podman image rm`).

Exam trap

EX188 often tests the exact syntax of Podman commands; candidates may confuse `podman rmi` with `podman image delete` or `podman rm` with `podman container clear`.

48
MCQmedium

An administrator wants to create a named volume using a specific volume driver instead of the default local driver. Which flag should be used with 'podman volume create'?

A.podman volume create --driver nfs my_vol
B.podman volume create --storage-driver nfs my_vol
C.podman volume create --plugin nfs my_vol
D.podman volume create -t nfs my_vol
AnswerA

The --driver flag specifies which volume driver Podman uses when creating the volume, overriding the default local driver. Naming nfs here instructs Podman to provision the volume through the NFS driver plugin, matching the requirement for a non-default driver.

Why this answer

'podman volume create --driver nfs my_vol' correctly specifies the volume driver using the '--driver' flag. Podman supports pluggable volume drivers, and '--driver' is the documented option to select a non-default driver such as nfs, glusterfs, or a custom plugin.

Exam trap

EX188 often tests the distinction between '--driver' (volume driver) and '--storage-driver' (container storage backend) — candidates conflate the two because both contain the word 'driver'.

How to eliminate wrong answers

Option B is wrong because '--storage-driver' is a global Podman option that selects the container storage backend (overlay, vfs, btrfs), not a volume driver — using it with 'volume create' is invalid. Option C is wrong because '--plugin' is not a recognized flag for 'podman volume create'; volume drivers are specified via '--driver'. Option D is wrong because '-t' is not a valid shorthand for driver selection in this context (it is used elsewhere for types, e.g., in 'podman network create -d'), and it would not set the volume driver.

49
Multi-Selecthard

When working with Podman Compose files, which TWO options are valid keys that can be specified under a service definition for port and networking configuration? (Choose two)

Select 2 answers
A.firewall
B.networks
C.nat_mapping
D.ports
E.ip_address
AnswersB, D

Under a service definition, `networks` is a valid key that attaches the container to one or more named networks declared in the top-level `networks` section, satisfying the networking configuration requirement. It accepts a list or mapping, letting you set per-network aliases and static IPs, unlike `network_mode`, which joins a single existing namespace.

Why this answer

Option B (networks) is correct because in a Compose service definition, the networks key attaches the service's containers to one or more named networks declared in the top-level networks section, controlling inter-service connectivity and DNS resolution. Option D (ports) is correct because the ports key publishes container ports to the host using mappings such as "8080:80", which is the standard Compose mechanism for exposing service ports. Option A (firewall) is not a valid Compose service key; firewall rules are handled by the host or container runtime, not by Compose file syntax.

Option C (nat_mapping) is not a Compose key; NAT behavior is implicit in port publishing rather than configured via a nat_mapping field. Option E (ip_address) is not a valid service-level key in Compose files; static IPs are set under a network's ipv4_address within the service's networks configuration, not as a top-level service key.

Exam trap

EX188 often tests which keys are actually part of the Compose specification versus plausible-sounding invented keys like firewall, nat_mapping, or ip_address, and candidates who guess based on Docker run flags pick the wrong ones.

50
Multi-Selecteasy

Which TWO flags can be used to mount volumes or bind mounts when running a container? (Choose TWO)

Select 2 answers
A.--mount
B.-v or --volume
C.--store-path
D.--attach-storage
E.--link-volume
AnswersA, B

The --mount flag attaches volumes or bind mounts to a container, accepting key-value parameters such as type, source, and destination. It satisfies the stem's requirement for mounting storage at container runtime, and is the modern, more explicit alternative to the legacy --volume flag.

Why this answer

Option A (--mount) is correct because it is the modern, explicit Docker flag for attaching volumes, bind mounts, and tmpfs mounts, using comma-separated key=value pairs such as type=bind,source=/host/path,target=/container/path. Option B (-v or --volume) is correct because it is the classic Docker shorthand for the same purpose, using the colon-separated syntax source:target[:options], and it remains fully supported for both named volumes and bind mounts. The unmarked options do not belong: --store-path is not a Docker run flag (it relates to storage configuration concepts, not container mounting), --attach-storage is not a valid Docker CLI option, and --link-volume is not a recognized Docker flag for attaching volumes or bind mounts.

Exam trap

EX188 often tests the difference between valid Docker flags and plausible-sounding but non-existent options, so candidates must remember that only --mount and -v/--volume are correct for mounting volumes.

51
Multi-Selecthard

An administrator is configuring container health checks and wants to review health status or force immediate actions. Which TWO of the following statements or commands are accurate regarding Podman health checks? (Choose TWO)

Select 2 answers
A.podman inspect --format='{{json .State.Health.Status}}' can be used to check container health status.
B.Health checks can be configured during container creation using the --health-cmd option.
C.Container health statuses are automatically logged to /var/log/podman-health.log on the host.
D.podman stop automatically triggers a health check before shutting down.
E.podman health-check status is a valid built-in standalone top-level command.
AnswersA, B

The `podman inspect` command reads the container's persisted state, and the Go template extracts the `State.Health.Status` field, returning values such as `healthy`, `unhealthy`, or `starting`. This satisfies the requirement to review health status without executing anything inside the container, since the healthcheck results are recorded by Podman itself.

Why this answer

Option A is correct because `podman inspect --format='{{json .State.Health.Status}}'` queries the container's State.Health.Status field, which reports the current health state (healthy, unhealthy, starting) for a container that has a health check defined. Option B is correct because health checks are configured at container creation time with `podman run --health-cmd` (alongside related flags like --health-interval, --health-retries, and --health-timeout), which defines the command Podman executes to determine health. Option C is incorrect because Podman does not write health status to a host file such as /var/log/podman-health.log; health state is stored in the container's state metadata and viewed via inspect.

Option D is incorrect because `podman stop` simply sends SIGTERM (then SIGKILL after a timeout) to the container and does not trigger a health check. Option E is incorrect because there is no top-level `podman health-check status` command; health checks are managed through run/create options and inspected via `podman inspect` or `podman healthcheck run`.

Exam trap

EX188 often tests whether candidates invent plausible-sounding Podman commands — the trap is selecting fabricated options like `podman health-check status` or a nonexistent log file instead of the real `--health-cmd` flag and `inspect` query.

52
MCQeasy

A containerized web service must be accessible from the host system on TCP port 8080, while the application inside the container listens on port 80. Which flag correctly configures this port mapping?

A.--expose 8080:80
B.-p 80:8080
C.-p 8080:80
D.--port-map 8080=80
AnswerC

Docker's -p flag maps host port to container port as host:container. Since the host must expose 8080 and the application listens on 80 inside the container, -p 8080:80 satisfies both constraints, routing host traffic on 8080 to container port 80.

Why this answer

The `-p` (or `--publish`) flag maps a host port to a container port using the syntax `-p HOST_PORT:CONTAINER_PORT`. Since the host must expose TCP 8080 and the application inside the container listens on port 80, the correct mapping is `-p 8080:80`. This forwards traffic arriving on host port 8080 to container port 80.

Exam trap

EX188 often tests the direction of the port mapping syntax; candidates frequently reverse `HOST:CONTAINER` and pick `-p 80:8080`, forgetting that the left side is always the host port.

How to eliminate wrong answers

Option A is wrong because `--expose` only documents a port for inter-container communication and does not publish it to the host; also, `--expose` takes a single port, not a `host:container` pair. Option B is wrong because `-p 80:8080` reverses the mapping, publishing container port 8080 to host port 80, which does not match the requirement. Option D is wrong because `--port-map` is not a valid Podman/Docker flag; the correct flag is `-p` or `--publish`.

53
MCQhard

An administrator creates a custom CNI network using 'podman network create mynet' and wants to assign a static IP address to a container upon creation. Which option achieves this?

A.podman run --network mynet:192.168.100.50 -d myimage
B.podman run --network mynet --ip 192.168.100.50 -d myimage
C.podman network connect --ip 192.168.100.50 mynet container_id
D.podman run --net-static-ip 192.168.100.50 -d myimage
AnswerB

Passing '--ip 192.168.100.50' alongside '--network mynet' assigns the static address within that custom CNI network at container creation. Podman only honours the static IP when the named network is specified, satisfying the requirement to fix the address during 'podman run'.

Why this answer

The `--ip` flag combined with `--network mynet` is the correct way to assign a static IP to a container on a custom CNI network in Podman. The syntax `podman run --network mynet --ip 192.168.100.50 -d myimage` attaches the container to the named network and requests the specified IP from the network's IPAM range. The IP must fall within the subnet defined when the network was created.

Exam trap

EX188 often tests whether candidates invent plausible-sounding flags like `--net-static-ip` or misuse the colon syntax in `--network`, instead of using the correct `--ip` flag with a named network.

How to eliminate wrong answers

Option A is wrong because the syntax `--network mynet:192.168.100.50` is not valid Podman syntax — the colon notation is used for aliases or options, not for specifying an IP address. Option C is wrong because `podman network connect --ip` is used to attach an existing container to a network, not to assign a static IP at creation time, and the question specifies assignment upon creation. Option D is wrong because `--net-static-ip` is not a valid Podman flag — no such option exists in the Podman CLI.

54
MCQhard

An administrator is troubleshooting a rootless Podman container that fails to write to a bind-mounted host directory. The directory is owned by the user on the host, but inside the container, the process runs as UID 1000 and receives permission denied. Which action should the administrator take to resolve the issue?

A.Change the container's user to root by adding --user root to the podman run command.
B.Add the :Z option to the mount to relabel the directory for SELinux.
C.Run the container with --privileged to bypass user namespace restrictions.
D.Use the :U mount option to recursively change ownership of the host directory to match the container's user namespace mapping.
AnswerD

The :U option tells Podman to adjust the ownership of the host directory so that it matches the UID/GID mapping inside the container. In rootless mode, the container's UID 1000 corresponds to a different host UID (often in the high range) due to user namespace remapping. Using :U ensures the container process has write access by changing the host directory's ownership to the mapped UID. This is the recommended solution for permission issues with bind mounts in rootless containers.

Why this answer

The root cause is the UID mapping between the container and the host in rootless mode. The :U mount option adjusts the host directory's ownership to match the container's user namespace, granting the necessary write permissions. The other options either do not address the ownership mismatch or introduce unnecessary security risks.

Exam trap

The trap here is assuming that running the container as root will grant host root privileges, but in rootless mode, root inside the container is mapped to the unprivileged host user.

55
MCQeasy

A user wants to inspect the effective signature verification policy that Podman will apply when pulling images, without modifying any files. Which command displays the current policy configuration?

A.podman image trust show
B.skopeo inspect docker://<registry>/<image>
C.podman info --format '{{.Registries}}'
D.podman inspect --type image <image>
AnswerA

The podman image trust show command displays the active signature verification policy derived from policy.json and related configuration. It shows which registries or repositories are allowed, and what signature requirements apply. It is read-only and does not alter the policy, making it suitable for inspecting the effective settings before pulling images.

Why this answer

The signature verification policy is defined in /etc/containers/policy.json and can be viewed with podman image trust show. This command prints the effective policy, including accepted registries and signature requirements, without editing files. It is the correct way to inspect what Podman will enforce when pulling images.

Exam trap

The trap here is confusing image metadata inspection with policy inspection, leading to commands that describe an image rather than the host's signature verification rules.

56
MCQeasy

Which command starts services defined in a Podman Compose file in detached mode?

A.podman-compose background
B.podman-compose start --detach
C.podman-compose up -d
D.podman-compose run -d
AnswerC

`podman-compose up -d` creates and starts every service declared in the Compose file, with `-d` detaching the containers so the terminal returns immediately. This directly satisfies the stem's requirement for detached mode, unlike `up` alone, which streams logs and blocks the session.

Why this answer

`podman-compose up -d` is the direct equivalent of `docker-compose up -d`: it creates and starts all services defined in the compose file and runs them in detached (background) mode. The `-d` flag is the standard shorthand for `--detach` across both Docker Compose and podman-compose.

Exam trap

EX188 often tests whether candidates confuse `up -d` (create and start detached) with `start` (start existing containers) or `run` (one-off container) — the verbs are not interchangeable.

How to eliminate wrong answers

Option A is wrong because `podman-compose background` is not a valid subcommand — there is no `background` verb in podman-compose. Option B is wrong because `podman-compose start --detach` is invalid; `start` only starts existing stopped containers and does not accept `--detach` (it is inherently non-attached). Option D is wrong because `podman-compose run -d` runs a one-off command in a new container, not the full set of services defined in the compose file.

57
Multi-Selecthard

Which TWO methods can be used to supply environment variables to a Podman container? (Choose TWO)

Select 2 answers
A.Using the --environment-map flag
B.Using the --var-file flag
C.Using the -e or --env flag
D.Using the --inject-env flag
E.Using the --env-file flag
AnswersC, E

The -e or --env flag passes a single variable directly on the podman run command line, setting it inside the container at launch. This satisfies the requirement to supply environment variables without needing an external file, ideal for quick, ad-hoc values.

Why this answer

Option C is correct because Podman supports the -e or --env flag to pass individual environment variables directly on the command line, e.g. podman run -e MYVAR=value image, which sets the variable inside the container. Option E is correct because the --env-file flag lets you supply a file containing KEY=value lines that Podman reads and injects as environment variables into the container. The other options are not valid Podman flags: --environment-map (A), --var-file (B), and --inject-env (D) do not exist in Podman's CLI, so they cannot be used to supply environment variables.

Exam trap

EX188 often tests the distinction between valid Podman flags and plausible-sounding but non-existent options like --environment-map or --inject-env, causing candidates to guess based on Docker or other tool familiarity.

58
Multi-Selecthard

Which THREE practices should be observed when managing environment variables (ENV vs ARG) in Containerfiles for secure and efficient builds? (Choose three.)

Select 3 answers
A.Use 'ENV' for configuration parameters that the application needs to read during container runtime.
B.Use 'ARG' for variables that are only needed during the build process and should not persist in the final image metadata.
C.Ensure that 'ENV' variables defined in earlier stages automatically carry over into subsequent multi-stage build stages without re-declaration.
D.Declare 'ARG' instructions before the first 'FROM' instruction if they are to be used in global FROM scoping (e.g., base image parameterization).
E.Use 'ENV' for passing secret API tokens so they are automatically encrypted in the image layers.
AnswersA, B, D

ENV values are baked into the image configuration and exported to the container's process environment at runtime, so the application can read configuration such as database hosts without rebuilds. ARG would not survive into the running container.

Why this answer

Option A is correct because ENV variables are baked into the image configuration and are available to the application at runtime, making them the right choice for runtime configuration parameters. Option B is correct because ARG values exist only during the build and, unlike ENV, are not persisted in the final image metadata, so build-only values should use ARG. Option D is correct because an ARG declared before the first FROM is in the global scope and can be referenced in FROM instructions (e.g., ARG BASE=alpine then FROM ${BASE}), enabling base image parameterization.

Option C is not correct because ENV variables do not automatically carry over between separate stages in a multi-stage build; each stage starts from its own base and must re-declare or explicitly inherit values. Option E is not correct because ENV values are stored in plaintext in image layers and metadata, so they must never be used for secrets such as API tokens.

Exam trap

EX188 often tests the misconception that ENV variables propagate across multi-stage build stages automatically and that ENV encrypts secrets — both are false and lead candidates to select the wrong options.

59
MCQeasy

A user needs to download an image from Docker Hub named 'library/alpine' using its explicit transport prefix. Which command demonstrates the correct transport syntax?

A.podman pull registry://alpine:latest
B.podman pull remote://alpine:latest
C.podman pull OCI://alpine:latest
D.podman pull docker://alpine:latest
AnswerD

The docker:// transport prefix explicitly forces Podman to treat the reference as a Docker Hub registry image, pulling library/alpine with the latest tag. This satisfies the stem's requirement for explicit transport syntax rather than relying on Podman's default registry resolution.

Why this answer

The correct transport for pulling from a Docker registry like Docker Hub is 'docker://'. The command 'podman pull docker://alpine:latest' explicitly tells Podman to use the Docker transport to fetch the 'library/alpine' image from Docker Hub. This syntax is part of Podman's support for multiple transports, where 'docker://' is the standard prefix for registry-based images.

Exam trap

EX188 often tests the distinction between different image transports in Podman, and candidates may confuse 'docker://' with other prefixes like 'oci://' or assume 'registry://' is valid, leading to incorrect answers.

How to eliminate wrong answers

Option A is wrong because 'registry://' is not a valid transport in Podman; the correct transport for Docker registries is 'docker://'. Option B is wrong because 'remote://' is not a recognized transport; Podman uses 'docker://' for remote registries. Option C is wrong because 'OCI://' is used for OCI image layouts stored locally or in a directory, not for pulling from a remote registry like Docker Hub.

60
MCQmedium

An administrator has a container that failed to start correctly. They want to inspect the exit code and finished timestamp. Which inspect format string provides the finished time?

A.podman inspect --format='{{.State.FinishedAt}}' failed_app
B.podman inspect --format='{{.Time.Ended}}' failed_app
C.podman inspect --format='{{.Finished}}' failed_app
D.podman ps --format='{{.FinishedAt}}' failed_app
AnswerA

The `{{.State.FinishedAt}}` field exposes the container's termination timestamp from its state object, satisfying the requirement to inspect when the failed container finished. Unlike `StartedAt` or `ExitCode`, this field specifically reports the completion time recorded by Podman, giving the exact finished timestamp the administrator needs.

Why this answer

Container lifecycle timestamps such as FinishedAt are stored under .State.

61
MCQmedium

A developer wants to mount a host directory into a container with read-only permissions to prevent accidental data modification. Which volume option flag achieves this?

A.podman run --read-only-mount=/host/data
B.podman run -v /host/data:/container/data:ro
C.podman run -v /host/data:/container/data:rw
D.podman run --mount type=bind,source=/host/data,destination=/container/data,readonly=false
AnswerB

The `:ro` suffix on the `-v` bind mount sets the mount's read-only attribute in the kernel, so writes to `/container/data` fail with EROFS. This directly satisfies the stem's constraint of preventing accidental modification of the host directory, while still exposing its contents to the container.

Why this answer

The -v /host/data:/container/data:ro syntax mounts the host directory with read-only permissions inside the container. The :ro suffix tells the runtime to mount the bind read-only, preventing any writes from the container to the host path. This is the standard short-form volume option for read-only bind mounts.

Exam trap

EX188 often tests the exact placement and spelling of the :ro option, and candidates confuse it with the nonexistent --read-only-mount flag or with readonly=false in the long-form syntax.

How to eliminate wrong answers

Option A is wrong because --read-only-mount is not a valid podman flag; there is no such option. Option C is wrong because :rw explicitly grants read-write access, the opposite of what is required. Option D is wrong because readonly=false explicitly disables read-only mode, and the --mount syntax uses readonly (or ro) as a boolean flag, not readonly=false for read-only.

62
MCQhard

An administrator is using Podman Quadlets to manage containers via systemd. Where must the Quadlet .container configuration file be placed for system-wide root containers?

A./etc/systemd/system/containers/
B./etc/containers/systemd/
C./var/lib/containers/systemd/quadlets/
D./etc/systemd/system/
AnswerB

Placing the .container file in /etc/containers/systemd/ satisfies the system-wide root requirement, since Quadlet's system generator scans this directory for root-owned units. Files here are processed by the systemd system manager, unlike user-scoped paths such as ~/.config/containers/systemd/, which only apply to rootless user services.

Why this answer

For system-wide root containers managed by Quadlets, the .container file must be placed in /etc/containers/systemd/. This directory is monitored by the podman-system-generator, which converts Quadlet files into systemd unit files at boot or on daemon-reload.

Exam trap

EX188 often tests the exact directory path for Quadlets, confusing it with standard systemd unit paths or container storage directories.

How to eliminate wrong answers

Option A is wrong because /etc/systemd/system/containers/ is not a recognized Quadlet search path; systemd does not scan subdirectories of /etc/systemd/system for unit files. Option C is wrong because /var/lib/containers/systemd/quadlets/ is not a standard Quadlet directory — /var/lib/containers is used for container storage, not unit definitions. Option D is wrong because /etc/systemd/system/ is for native systemd unit files, not Quadlet .container files; placing a .container file there will not be processed by the Quadlet generator.

63
Multi-Selecthard

An administrator is working with Podman Quadlets to manage container lifecycles via systemd. Which TWO statements regarding Quadlet file naming conventions and directory locations are correct? (Choose TWO)

Select 2 answers
A.Rootless Quadlet files are placed in /var/lib/containers/systemd/ root directory.
B.Quadlet configuration files are automatically translated into native systemd unit files by Podman generators.
C.System-wide Quadlet configuration files are placed in /etc/containers/systemd/.
D.Quadlet files must be manually compiled using gcc before systemd can read them.
E.Quadlet container unit files must use the exact file extension .service.container.
AnswersB, C

Podman's systemd generators parse Quadlet files at daemon-reload and emit native unit files, so systemd manages the containers directly without a separate Podman service. This satisfies the stem's requirement that Quadlets manage container lifecycles via systemd, since the generated units are what systemd actually starts and stops.

Why this answer

Option B is correct because Podman ships systemd generators (podman-system-generator and podman-user-generator) that read .container, .volume, .network, .pod, and .kube Quadlet files and translate them into native systemd unit files at boot or daemon-reload time, so no manual compilation is needed. Option C is correct because system-wide (root) Quadlets are stored in /etc/containers/systemd/, which is the documented location the root-level generator scans for administrator-managed units. Option A is wrong because /var/lib/containers/systemd/ is not the rootless Quadlet directory; rootless units belong in ~/.config/containers/systemd/ (or /etc/containers/systemd/users/ for per-user system-wide placement).

Option D is wrong because Quadlet files are plain-text INI-style configuration consumed by Podman's generators, not C source requiring gcc. Option E is wrong because Quadlet container units use the single extension .container (e.g., foo.container), not .service.container.

Exam trap

EX188 often tests the distinction between rootless and rootful Quadlet directory paths and the file extensions, causing candidates to confuse /etc/containers/systemd/ with /var/lib/containers/systemd/ or to assume Quadlet files need compilation.

64
MCQeasy

A practitioner wants to view all container images currently stored in local storage, including their size, tag, and image ID. Which command should they execute?

A.podman list images
B.podman images
C.podman show images
D.podman ps -a
AnswerB

The podman images command lists all container images in local storage, showing repository, tag, image ID and size. That directly matches the requirement to view every locally stored image with its size, tag and ID.

Why this answer

The `podman images` command lists all container images in local storage, displaying repository, tag, image ID, creation time, and size. It is the direct equivalent of `docker images` and is the standard way to inspect the local image cache. Options A, C, and D are not valid Podman subcommands for listing images.

Exam trap

EX188 often tests the confusion between container and image management commands, specifically the difference between `podman ps` (containers) and `podman images` (images), and the invalid use of `list` or `show` as subcommands.

How to eliminate wrong answers

Option A is wrong because `podman list images` is not a valid command; Podman uses `podman images` (or `podman image list`) to list images, and `podman list` alone is not a recognized subcommand. Option C is wrong because `podman show images` does not exist; `podman show` is not a command, and image inspection is done with `podman inspect`. Option D is wrong because `podman ps -a` lists containers (including stopped ones), not images; it shows container IDs, names, status, and ports, but not image details like size or tag.

65
Multi-Selectmedium

An administrator needs to export container contents or create new images from containers. Which TWO commands accomplish these actions? (Choose TWO)

Select 2 answers
A.podman extract
B.podman push-container
C.podman commit
D.podman export
E.podman save
AnswersC, D

`podman commit` creates a new image from a container's current writable layer, satisfying the requirement to create new images from containers. It captures filesystem changes made inside a running or stopped container, unlike `podman export`, which streams the filesystem as a tar archive without producing a reusable image.

Why this answer

Option C, podman commit, is correct because it creates a new image from a container's current state (including its filesystem and specified configuration), which directly satisfies the requirement to create new images from containers. Option D, podman export, is correct because it exports a container's filesystem as a tar archive, which directly satisfies the requirement to export container contents. Option A, podman extract, is not a valid Podman command for this purpose, so it does not belong.

Option B, podman push-container, is not a valid Podman command; pushing is done with podman push for images, not containers. Option E, podman save, saves an existing image to an archive rather than exporting container contents or creating a new image from a container, so it does not meet the scenario.

Exam trap

EX188 often tests whether candidates confuse `podman save` (image archiving) with `podman export` (container filesystem export), and whether they invent nonexistent subcommands like `push-container` or `extract`.

66
Multi-Selectmedium

Which THREE directives or practices are associated with implementing secure container builds and adhering to least-privilege principles? (Choose three.)

Select 3 answers
A.Hardcoding database passwords directly into ENV instructions so the application can read them easily.
B.Using minimal, trusted base images to reduce the total software footprint and vulnerability surface.
C.Adding a 'USER' instruction with a non-root UID/username before defining the runtime CMD or ENTRYPOINT.
D.Running all RUN instructions with '--privileged' inside the Containerfile.
E.Using build-time secrets with '--secret' mounts rather than baking credentials into image layers.
AnswersB, C, E

Minimal trusted base images shrink the installed package set, directly reducing the vulnerability surface and satisfying least privilege by removing unnecessary software. Fewer components mean fewer exploitable paths and less to patch, which is the mechanism that limits attacker opportunity.

Why this answer

Option B is correct because starting from minimal, trusted base images (e.g., distroless, alpine, or scratch) shrinks the installed package set and attack surface, reducing the number of exploitable CVEs in the final image. Option C is correct because a USER instruction that switches to a non-root UID/username before CMD or ENTRYPOINT enforces least privilege at runtime, preventing container processes from having root capabilities if the container is compromised. Option E is correct because BuildKit's --secret mounts (e.g., RUN --mount=type=secret) inject credentials only during the build step without persisting them in any image layer, unlike ENV or COPY which bake secrets permanently into the image history.

Option A is wrong because hardcoding database passwords in ENV instructions stores credentials in plaintext in image metadata and layers, violating least privilege and secret-management best practices. Option D is wrong because running RUN instructions with --privileged grants the build container full host capabilities, which is the opposite of least privilege and dramatically increases the risk of container escape during builds.

Exam trap

EX188 often tests the misconception that ENV or ARG is an acceptable place for secrets, when in fact only BuildKit secret mounts keep credentials out of image layers.

67
MCQeasy

An administrator wants to immediately stop and remove a running container named temp_test in a single command. Which command should be used?

A.podman kill --remove temp_test
B.podman delete --force temp_test
C.podman stop --rm temp_test
D.podman rm -f temp_test
AnswerD

The -f flag forces removal of a running container, sending SIGKILL and deleting it without a prior stop step. This satisfies the requirement to stop and remove temp_test in a single command, unlike plain podman rm, which fails on running containers.

Why this answer

The podman rm -f command force-removes a running container by sending SIGKILL to its processes and then deleting the container in a single operation. The -f (or --force) flag is what allows removal of a running container without a prior podman stop. This is the canonical one-step command for the scenario described.

Exam trap

EX188 often tests whether candidates confuse podman kill (signal only) with podman rm -f (signal + delete), and whether they invent non-existent flags like --remove on kill or --rm on stop.

How to eliminate wrong answers

Option A is wrong because podman kill only sends a signal to the container's main process; it does not remove the container, and there is no --remove flag on podman kill. Option B is wrong because podman delete is not a valid Podman subcommand — the correct verb is rm (or remove). Option C is wrong because podman stop does not accept a --rm flag; --rm is a run-time option that auto-removes a container after it exits, not a stop-time option.

68
MCQhard

You are optimizing a Containerfile using multi-stage builds to minimize image size. What is the key advantage of a multi-stage build in Podman?

A.It automatically converts Dockerfiles into systemd service units.
B.It allows you to copy only finalized artifacts from a heavy build stage into a minimal production stage.
C.It enables building container images concurrently across multiple remote container registries.
D.It eliminates the need for caching layers during the podman build process.
AnswerB

Multi-stage builds let earlier stages carry compilers, SDKs and build dependencies, while the final stage copies only the finished artefacts. This keeps the production image minimal, since heavyweight build tooling never ships in the runtime layer, directly reducing image size.

Why this answer

Multi-stage builds let you use multiple FROM instructions in a single Containerfile, where earlier stages can contain heavy build tools and dependencies, and the final stage copies only the compiled artifacts (binaries, static files) from the build stage. This dramatically reduces the final image size because compilers, SDKs, and intermediate files are discarded. The COPY --from=<stage> instruction is the key mechanism enabling this selective transfer.

Exam trap

EX188 often tests whether candidates confuse multi-stage builds with image distribution or caching features, when the core purpose is simply copying finalized artifacts from a heavy build stage into a minimal runtime stage.

How to eliminate wrong answers

Option A is wrong because multi-stage builds have nothing to do with systemd unit generation; Podman can generate systemd units via `podman generate systemd`, but that is unrelated to multi-stage builds. Option C is wrong because multi-stage builds do not enable concurrent builds across remote registries; they are a Containerfile authoring technique for reducing image size, not a distribution or parallelism feature. Option D is wrong because multi-stage builds do not eliminate layer caching — each stage still benefits from layer caching, and in fact caching behavior across stages is an important consideration, not something multi-stage builds remove.

69
MCQhard

When using the ADD instruction with a remote URL source, what is a recommended best practice regarding security and layer efficiency?

A.Always use ADD for remote URLs because it automatically verifies SSL/TLS certificates against the host system store.
B.ADD for remote URLs is deprecated and will cause podman build to abort with an error.
C.Avoid ADD for remote URLs; instead, use curl or wget within a RUN instruction to download, extract, and clean up in a single layer.
D.Use ADD for remote URLs because it creates a smaller layer than RUN.
AnswerC

Using curl/wget in a RUN instruction gives granular control over downloads, headers, and cache handling.

Why this answer

Using ADD with a remote URL is discouraged because it creates a separate layer for the downloaded file and does not automatically extract archives (unless the URL points to a recognized archive format, but that behavior is inconsistent). Instead, using curl or wget within a RUN instruction allows you to download, extract, and clean up in a single layer, reducing image size and avoiding caching issues. This is a security best practice because you can verify checksums and avoid leaving unnecessary files.

Exam trap

EX188 often tests the difference between ADD and COPY, and candidates mistakenly believe ADD is preferred for remote URLs due to convenience, ignoring layer efficiency and security.

How to eliminate wrong answers

Option A is wrong because ADD does not automatically verify SSL/TLS certificates against the host system store; it relies on the container's CA certificates, which may be outdated or missing. Option B is wrong because ADD for remote URLs is not deprecated; it still works but is discouraged. Option D is wrong because ADD for remote URLs creates an additional layer for the downloaded file, which can increase image size, not decrease it.

70
MCQhard

A security engineer is troubleshooting why signature verification fails when pulling an image from a trusted registry. The policy file (/etc/containers/policy.json) specifies 'signedBy' using a GPG key, but the transport uses 'dir://'. Where must the public GPG key be imported for Podman to successfully verify the signature?

A.Into the local GnuPG keyring using 'gpg --import'
B.Into ~/.config/containers/policy.d/keys/
C.Into /etc/containers/certs.d/keys/
D.Into /var/lib/containers/sigstore/
AnswerA

For dir:// transports, Podman verifies signatures against keys in the local GnuPG keyring, so the public key must be imported there with gpg --import. Registry-scoped key files or policy entries alone do not satisfy verification for a directory transport.

Why this answer

For the dir:// transport, Podman verifies signatures using keys in the local GnuPG keyring, so the public key must be imported with 'gpg --import' into the user's keyring (or root's, depending on context). The signedBy field in policy.json references a key fingerprint that Podman looks up in that keyring during verification.

Exam trap

EX188 often tests the distinction between key storage locations for different transports, tempting candidates to pick sigstore or certs.d paths that sound authoritative but are used for entirely different purposes.

How to eliminate wrong answers

Option B is wrong because ~/.config/containers/policy.d/keys/ is not a directory Podman consults for GPG keys — policy.d holds policy fragments, not key material. Option C is wrong because /etc/containers/certs.d/keys/ is not a standard path; certs.d is used for registry TLS certificates, not signature keys. Option D is wrong because /var/lib/containers/sigstore/ stores signature blobs fetched from registries for the docker:// transport, not the public keys used for dir:// verification.

71
MCQeasy

An administrator needs to pass a configuration file located at /etc/myapp/config.yml on the host into a container at the same path. The container should read the file but not modify it. Which Podman run option accomplishes this with minimal risk of accidental modification?

A.podman run -v /etc/myapp:/etc/myapp:ro myapp:latest
B.podman run --mount type=bind,source=/etc/myapp/config.yml,target=/etc/myapp/config.yml myapp:latest
C.podman run --volume /etc/myapp/config.yml:/etc/myapp/config.yml:rw myapp:latest
D.podman run -v /etc/myapp/config.yml:/etc/myapp/config.yml:ro myapp:latest
AnswerD

The :ro option mounts the file as read-only inside the container, preventing any writes. This directly meets the requirement to read but not modify, and it uses a bind mount to map the specific host file. It is the correct and safe choice.

Why this answer

Using -v with :ro mounts the specific host file as read-only inside the container, satisfying the read-only requirement. The other options either allow write access, mount a directory instead of a file, or omit read-only protection. The :ro flag is essential to prevent accidental modification.

Exam trap

The trap here is overlooking the :ro flag and assuming any bind mount is read-only by default, but bind mounts are read-write unless explicitly specified otherwise.

72
MCQhard

A rootless Podman user must run a container that needs to write to a bind-mounted host directory. The container consistently fails with permission denied. The host directory is owned by the user and has mode 0775. SELinux is enforcing. Which action will allow the container to write to the directory without disabling SELinux?

A.Add the `:Z` option to the volume mount to relabel the host directory for the container.
B.Change the host directory mode to 0777 to eliminate permission issues.
C.Set the `container_manage_cgroup` boolean to allow container writes.
D.Run `podman run --privileged` to bypass all SELinux checks.
AnswerA

The :Z option tells Podman to relabel the host directory with a private SELinux label unique to the container. This allows the container process to write while keeping SELinux enforcing. It is the recommended way to handle SELinux denials for bind mounts in rootless mode, and it does not require disabling or weakening SELinux.

Why this answer

When a bind-mounted host directory is not labeled for container access, SELinux denies writes. Adding :Z to the volume mount causes Podman to relabel the directory with a container-specific private label, allowing the container to write while SELinux remains enforcing. This is the standard, secure fix for this scenario.

Exam trap

The trap here is thinking that fixing Unix permissions or disabling SELinux solves the problem, when the real issue is the SELinux label on the host directory.

73
MCQeasy

You want to set the working directory for any subsequent RUN, CMD, ENTRYPOINT, COPY, and ADD instructions that follow it in the Containerfile. Which instruction achieves this?

A.DIR
B.WORKDIR
C.CD
D.PATH
AnswerB

WORKDIR sets the working directory for subsequent RUN, CMD, ENTRYPOINT, COPY and ADD instructions, satisfying the stem's requirement to affect all following instructions. Unlike cd inside a single RUN, it persists across build stages and layers, so later instructions resolve relative paths from that directory.

Why this answer

The WORKDIR instruction sets the working directory for subsequent RUN, CMD, ENTRYPOINT, COPY, and ADD instructions in a Containerfile. If the directory does not exist, WORKDIR creates it automatically, and it can be used multiple times to change context throughout the build.

Exam trap

The trap is picking CD because it is the familiar shell command for changing directories — candidates forget that Containerfile instructions are a distinct DSL and CD is not part of it.

How to eliminate wrong answers

Option A is wrong because DIR is not a valid Containerfile instruction — it is a Windows command shell builtin, not a Dockerfile/Containerfile directive. Option C is wrong because CD is a shell command, not a Containerfile instruction; it cannot be used to set build-time working directory. Option D is wrong because PATH is an environment variable, not an instruction, and it controls executable lookup, not the working directory.

74
MCQeasy

What type of storage pattern is used by default when a container writes logs and temporary application state directly to its writable layer without any volumes attached?

A.Persistent named storage
B.Ephemeral container storage
C.Bind mount storage
D.Block storage replication
AnswerB

The writable layer sits atop the container's image and is destroyed with the container, so logs and temporary state written there vanish on restart. This is ephemeral container storage, the default pattern absent any mounted volume.

Why this answer

When a container writes logs or temporary state to its writable layer without any volume attached, that data is stored in the container's ephemeral writable layer. This storage is tied to the container's lifecycle and is lost when the container is removed, making it ephemeral. It is not persistent, not a bind mount, and not replicated block storage.

Exam trap

EX188 often tests the misconception that container writable layers are persistent, confusing them with volumes or bind mounts.

How to eliminate wrong answers

Option A is wrong because persistent named storage refers to named volumes that survive container removal, which is not the case here. Option C is wrong because bind mount storage refers to mounting a host directory into the container, which is explicitly not happening. Option D is wrong because block storage replication is a storage infrastructure concept unrelated to a container's writable layer.

75
Multi-Selectmedium

An administrator wants to modify container settings or state. Which TWO of the following commands are valid Podman subcommands for container management? (Choose TWO)

Select 2 answers
A.podman reconfigure
B.podman alter
C.podman modify
D.podman restart
E.podman rename
AnswersD, E

podman restart stops and starts an existing container, applying updated configuration such as changed resource limits or environment settings. It is a valid container-management subcommand, satisfying the administrator's need to modify container state without recreating it.

Why this answer

Option D, 'podman restart', is a valid Podman subcommand that stops and starts one or more running containers, which directly modifies container state and is used for container management. Option E, 'podman rename', is also a valid Podman subcommand that changes the name of an existing container, thereby modifying container settings/state. The other options are not Podman subcommands: 'podman reconfigure', 'podman alter', and 'podman modify' do not exist in Podman's CLI, so they cannot be used to manage containers.

Exam trap

EX188 often tests whether candidates invent plausible verbs — the trap is choosing fabricated commands like `podman modify` or `podman alter` instead of the real `restart` and `rename`.

Page 1 of 4

Page 2

All pages