Courseiva

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

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

Page 1

Page 2 of 4

Page 3
76
Multi-Selectmedium

Which TWO statements are true regarding Podman bind mounts? (Choose TWO)

Select 2 answers
A.They are automatically deleted when the container is removed
B.They cannot be mounted in read-only mode
C.They are managed entirely inside Podman's internal volume database without host paths
D.They link a specific host path directly into the container filesystem
E.Host file permissions and SELinux contexts directly impact container access
AnswersD, E

A bind mount maps an existing absolute host path, such as /home/user/data, straight into the container's filesystem namespace, rather than creating an isolated volume. This satisfies the stem's requirement of linking a specific host path directly into the container filesystem.

Why this answer

Option D is correct because a Podman bind mount maps an explicit host directory or file path directly into a container path (e.g., -v /host/dir:/container/dir), unlike named volumes that Podman manages under its storage root. Option E is correct because bind mounts expose the host filesystem's ownership, mode bits, and SELinux labels to the container, so permission denials or SELinux AVC denials on the host path directly affect container access (often requiring :z/:Z relabeling or correct UID/GID mapping). Option A is wrong because bind mounts are host paths that persist after the container is removed; only anonymous volumes may be cleaned up.

Option B is wrong because bind mounts can be mounted read-only using the :ro (or :ro,Z) mount option. Option C is wrong because that describes Podman-managed named volumes stored in Podman's volume database, not bind mounts, which reference host paths directly.

Exam trap

EX188 often tests the distinction between bind mounts (host-path-referenced, permission/SELinux-sensitive, persistent) and named volumes (Podman-managed, stored in the volume database) — candidates who conflate the two pick options describing volume behavior for bind mounts.

77
MCQeasy

An administrator needs to run a container that shares the host's network namespace directly so it can listen on privileged ports without port forwarding. Which Podman command flag achieves this network mode?

A.--network host
B.--network bridge
C.--publish-all
D.--net=none
AnswerA

`--network host` places the container directly in the host's network namespace, so it binds host interfaces and privileged ports without NAT or `-p` forwarding. This satisfies the stem's requirement to share the host namespace and listen on privileged ports directly, unlike bridge or slirp4netns modes.

Why this answer

The `--network host` flag runs the container in the host's network namespace, meaning it shares the host's IP address and can bind to privileged ports (e.g., port 80) without port forwarding. This is the correct flag for the described requirement.

Exam trap

EX188 often tests the difference between network modes; candidates may think `--publish-all` shares the host network, but it only publishes ports on a bridge network.

How to eliminate wrong answers

Option B is wrong because `--network bridge` connects the container to a bridge network, which provides isolation and requires port publishing to expose ports. Option C is wrong because `--publish-all` publishes all exposed ports to random host ports, but it does not share the host network namespace. Option D is wrong because `--net=none` disables networking entirely, giving the container only a loopback interface.

78
MCQeasy

Which configuration block in a Podman Compose YAML file is used to define custom isolated networks for the multi-container application?

A.interfaces:
B.bridges:
C.networks:
D.connections:
AnswerC

The top-level networks: block declares custom isolated networks and their drivers, letting services join named networks for inter-container communication. Without it, Compose attaches containers to a single default network, so this block is what defines the isolation the scenario requires.

Why this answer

In a Podman Compose YAML file, the top-level 'networks:' block defines custom isolated networks for the multi-container application. Services then reference these networks via their own 'networks:' key to attach to them.

Exam trap

EX188 often tests the exact YAML key for networks, confusing it with Docker-specific terms like 'bridges' or generic terms like 'interfaces'.

How to eliminate wrong answers

Option A is wrong because 'interfaces:' is not a valid Compose top-level key; network interfaces are configured at the container level, not defined as a Compose block. Option B is wrong because 'bridges:' is not a Compose keyword; while Docker uses bridge drivers, the YAML block is still 'networks:'. Option D is wrong because 'connections:' is not a Compose block; it is not used to define networks in Compose specifications.

79
MCQhard

You need to ensure that a container image built with Podman includes reproducible timestamps for files to improve security and supply chain verification. Which flag or environment variable controls this?

A.PODMAN_REPRODUCIBLE_BUILD=true
B.TIMESTAMP=0 in the Containerfile ENV
C.--reproducible flag in podman build
D.SOURCE_DATE_EPOCH
AnswerD

SOURCE_DATE_EPOCH sets a fixed Unix timestamp that Podman's build tooling applies to file metadata, replacing build-time clocks. This yields byte-identical layers across rebuilds, satisfying the reproducibility constraint and enabling deterministic image digests for supply chain verification.

Why this answer

SOURCE_DATE_EPOCH is the standardized environment variable (from the reproducible-builds.org specification) that sets a fixed timestamp for files created during a build, enabling bit-for-bit reproducible images. Podman and Buildah honor it during podman build, so setting it produces deterministic file timestamps. This supports supply chain verification because identical inputs yield identical image digests.

Exam trap

EX188 often tests whether candidates know the standardized reproducible-build variable versus invented flags, so candidates who guess a plausible-sounding --reproducible flag or PODMAN_* variable pick A or C.

How to eliminate wrong answers

Option A is wrong because PODMAN_REPRODUCIBLE_BUILD is not a real Podman environment variable; no such flag exists in Podman's documentation. Option B is wrong because setting TIMESTAMP=0 in a Containerfile ENV only defines an application-level variable and does not control how the build engine stamps files. Option C is wrong because podman build has no --reproducible flag; reproducibility is achieved via SOURCE_DATE_EPOCH and related build practices, not a dedicated CLI switch.

80
MCQhard

An administrator is working with a rootless Podman setup and needs to ensure that container user namespaces map UIDs correctly such that container root (UID 0) maps to the unprivileged user's UID on the host. Which file configures subordinate UID mappings for rootless users on RHEL?

A./etc/subuid and /etc/subgid
B./etc/containers/userns.conf
C./etc/security/limits.conf
D./etc/passwd and /etc/group
AnswerA

Rootless Podman reads /etc/subuid and /etc/subgid to allocate the subordinate UID and GID ranges that newuidmap and newgidmap apply, mapping container UID 0 onto the unprivileged host user. These files are the RHEL mechanism the stem requires.

Why this answer

Rootless user namespaces rely on /etc/subuid and /etc/subgid for mapping ranges.

81
Multi-Selecthard

Which THREE behaviors occur when utilizing multi-stage builds in a Containerfile? (Choose three.)

Select 3 answers
A.You can include multiple 'FROM' instructions in a single Containerfile, where each 'FROM' starts a new stage of the build.
B.All intermediate stages are automatically tagged and pushed to the local registry when the build completes.
C.You can assign a name to a build stage using the 'AS stage_name' syntax on the FROM instruction.
D.Artifacts from earlier stages are automatically merged into the final image layers unless explicitly deleted.
E.You can use 'COPY --from=<stage_name>' to pull compiled artifacts from a previous stage into the current stage.
AnswersA, C, E

Each FROM instruction begins a fresh build stage with its own base image and filesystem layer, so a single Containerfile can chain several stages. This satisfies the multi-stage requirement that stages remain isolated until explicitly copied between.

Why this answer

Multi-stage builds allow multiple FROM lines, naming stages, and selective copying between them.

82
MCQeasy

An administrator has a running container named web_front that was started with podman run -d --name web_front nginx. The administrator needs to execute the command 'nginx -T' inside this already-running container to dump the full configuration. Which command accomplishes this?

A.podman run web_front nginx -T
B.podman attach web_front nginx -T
C.podman start web_front nginx -T
D.podman exec web_front nginx -T
AnswerD

podman exec runs a new process inside an already-running container, which is exactly the requirement here. Because web_front is running and the nginx binary exists in the container's filesystem, this command starts nginx -T within the existing container namespaces and returns its output to the host terminal. No container restart or image rebuild is needed.

Why this answer

Running a diagnostic or interactive command inside a container that is already running requires podman exec, which spawns an additional process in the container's namespaces. Commands like podman run create new containers, podman attach links to PID 1, and podman start only starts stopped containers, so none of them can execute nginx -T within the existing web_front container.

Exam trap

The trap here is confusing podman run (which creates a new container from an image) with podman exec (which runs a command inside an existing running container).

83
Multi-Selecthard

You are troubleshooting a Podman Compose deployment where containers on a user-defined network cannot resolve each other by service name, although they can reach each other by IP address. Which TWO conditions would explain the name resolution failure? (Choose two.)

Select 2 answers
A.Each service publishes its port to the host with 'ports:', which replaces the internal DNS records.
B.The Compose file sets 'dns:' on each service to an external resolver that has no record of the service names.
C.The containers are running with '--network none' but have static /etc/hosts entries for each other.
D.The containers were attached to the default bridge network instead of the Compose-created user-defined network.
E.The aardvark-dns process responsible for answering queries on that network is not running or failed to start.
AnswersD, E

Name resolution by service name is provided by aardvark-dns on user-defined networks. The default bridge network does not provide automatic service-name DNS for containers, so containers placed there can communicate by IP but cannot resolve each other's names. Ensuring the services are attached to the Compose-created network restores name resolution.

Why this answer

Service-name resolution on a user-defined Podman network depends on two things: the containers must be attached to that network, and aardvark-dns must be running to answer queries. If containers sit on the default bridge or the DNS service is down, IP connectivity still works through the bridge while name lookups fail. Fixing the network attachment or the DNS service restores resolution.

Exam trap

The trap here is assuming that IP reachability implies DNS is configured, when on Podman the two are independent and a missing network attachment or a stopped aardvark-dns breaks only name resolution.

84
MCQeasy

An administrator wants to view the last 50 lines of logs for a running container named log_test and keep the log stream open for new entries. Which command should be used?

A.podman tail 50 log_test
B.podman log-stream --lines=50 log_test
C.podman inspect --tail=50 log_test
D.podman logs --tail 50 --follow log_test
AnswerD

The --tail 50 flag limits output to the final fifty lines, while --follow keeps the stream open and prints new entries as the container writes them. Together they satisfy both constraints: viewing recent logs and continuing to monitor the running container named log_test.

Why this answer

`podman logs --tail 50 --follow log_test` retrieves the last 50 lines of container logs and keeps the stream open for new entries, exactly matching the requirement. The `--tail` flag limits historical output, and `--follow` (or `-f`) streams new log lines as they are written.

Exam trap

EX188 often tests whether candidates invent plausible-sounding subcommands like `podman tail` or `podman log-stream` — the trap is not remembering that log retrieval is always done via `podman logs` with flags.

How to eliminate wrong answers

Option A is wrong because `podman tail` is not a valid Podman subcommand — there is no `tail` verb in the Podman CLI. Option B is wrong because `podman log-stream` does not exist; the correct command is `podman logs` with the `--follow` flag. Option C is wrong because `podman inspect` outputs container metadata in JSON and does not read log files; it also does not support `--tail` or `--follow` flags for log streaming.

85
Multi-Selecteasy

Which TWO instructions are used to define variables or set environment values within a Containerfile? (Choose two.)

Select 2 answers
A.DEFINE
B.VAR
C.ARG
D.ENV
E.SET
AnswersC, D

ARG declares build-time variables that are available only during the image build, not at container runtime. This satisfies the stem's requirement to define variables within a Containerfile, since ARG instructions set values consumed by subsequent build steps such as RUN, without persisting into the running container's environment.

Why this answer

ARG and ENV are used for defining build arguments and environment variables respectively.

86
MCQmedium

An administrator wants to inspect the container storage configuration settings, such as graph root and storage driver, on a RHEL system. Which configuration file should they examine?

A./etc/containers/podman.conf
B./etc/containers/registries.conf
C./etc/containers/storage.conf
D./etc/sysconfig/docker
AnswerC

/etc/containers/storage.conf holds the container storage configuration, including graph root and storage driver settings used by Podman and related tools on RHEL. Editing this file changes where images and containers are stored and which driver handles the layers.

Why this answer

The /etc/containers/storage.conf file is the primary configuration file for container storage on RHEL systems using Podman. It defines settings such as the storage driver (e.g., overlay) and the graph root directory where container images and layers are stored. Administrators inspect this file to understand or modify how container storage is managed.

Exam trap

EX188 often tests the confusion between configuration files for different container aspects, such as storage versus registries, and the assumption that Docker-specific files apply to Podman.

How to eliminate wrong answers

Option A is wrong because /etc/containers/podman.conf does not exist as a standard configuration file for Podman; Podman uses various files under /etc/containers/ but not this one. Option B is wrong because /etc/containers/registries.conf configures container registry access (e.g., which registries to use and their mirrors), not storage settings. Option D is wrong because /etc/sysconfig/docker is a configuration file for Docker, not Podman, and on RHEL 9 Podman is the default container engine.

87
MCQeasy

You are writing a Containerfile to build a custom application image using podman build. Which instruction should you use as the mandatory first non-comment instruction to define the base image?

A.IMPORT
B.FROM
C.BASE
D.INIT
AnswerB

FROM specifies the base image that subsequent Containerfile instructions build upon, and it must be the first non-comment instruction in a valid Containerfile. This satisfies the stem's requirement, because podman build cannot construct a layered image without an initial parent image reference.

Why this answer

The FROM instruction is the mandatory first non-comment instruction in a Containerfile (or Dockerfile) because it specifies the base image upon which subsequent instructions operate. Without FROM, the build cannot determine the starting filesystem and will fail. It sets the stage for all following layers, such as RUN, COPY, and CMD.

Exam trap

EX188 often tests the misconception that other keywords like BASE or IMPORT can define the base image, but only FROM is valid; candidates might confuse Docker commands with Containerfile instructions.

How to eliminate wrong answers

Option A is wrong because IMPORT is not a valid Containerfile instruction; it is a Docker command (docker import) for creating an image from a tarball, not a build instruction. Option C is wrong because BASE is not a recognized instruction in Containerfile syntax; the correct keyword is FROM. Option D is wrong because INIT is not a Containerfile instruction; it might be confused with init processes in containers, but it has no role in defining the base image.

88
MCQmedium

Two containers running on the same custom user-defined bridge network need to communicate with each other. What built-in mechanism allows them to resolve each other by container name?

A.Automatic DNS resolution provided by the CNI/Netavark network backend
B.Static ARP table broadcasting managed by the kernel
C.Multicast DNS (mDNS) running inside every container image by default
D.Automatic editing of the host's /etc/hosts file by the Podman daemon
AnswerA

Netavark's embedded DNS server resolves container names to IP addresses for containers attached to the same user-defined bridge network, so no manual linking or /etc/hosts editing is needed. The default bridge lacks this name resolution, making the custom network the enabling factor.

Why this answer

When containers are attached to the same user-defined bridge network in Podman, the Netavark (or CNI) network backend runs an embedded DNS resolver that registers each container's name and aliases. This allows containers to resolve each other by name without any manual configuration, similar to Docker's user-defined bridge behavior. The default bridge network does not provide this; only custom user-defined networks do.

Exam trap

EX188 often tests the misconception that the default bridge network provides automatic DNS resolution, when in fact only custom user-defined networks do.

How to eliminate wrong answers

Option B is wrong because ARP operates at Layer 2 for MAC-to-IP resolution and does not provide name-to-IP resolution for container hostnames. Option C is wrong because mDNS (Avahi/Bonjour) is not enabled by default inside container images and is not the mechanism Podman uses for inter-container name resolution. Option D is wrong because Podman does not edit the host's /etc/hosts file for container-to-container resolution; that would be a host-level, not container-level, mechanism and is not how Netavark DNS works.

89
MCQhard

An administrator needs to update the CPU shares (cpu-shares) of a running container named compute_job on the fly without stopping it. Which command should be used?

A.podman update --cpu-shares 512 compute_job
B.podman config compute_job cpu-shares=512
C.podman modify --cpu-shares 512 compute_job
D.podman set --shares=512 compute_job
AnswerA

podman update modifies resource constraints on a live container without restarting it, and --cpu-shares sets relative CPU weighting. This satisfies the requirement to change cpu-shares on the running compute_job container on the fly, preserving its state.

Why this answer

The podman update command modifies resource limits of a running container without requiring a restart, and --cpu-shares is one of the supported tunables. Running podman update --cpu-shares 512 compute_job adjusts the relative CPU weight of the container on the fly, which is exactly what the administrator needs.

Exam trap

EX188 often tests whether candidates know that podman update is the live-modification command, and whether they fall for plausible but non-existent verbs like modify, set, or config.

How to eliminate wrong answers

Option B is wrong because podman config is not a valid Podman subcommand for modifying running containers — no such command exists in the Podman CLI. Option C is wrong because podman modify is not a real Podman subcommand; the correct verb is update. Option D is wrong because podman set does not exist as a Podman command, and --shares is not the correct flag name — the flag is --cpu-shares.

90
Multi-Selecthard

Which THREE methods or options can be used to authenticate or supply credentials when pulling images from a private registry that requires authentication? (Choose three.)

Select 3 answers
A.Running 'podman login' beforehand to store credentials in auth.json.
B.Setting the environment variable 'PODMAN_PASSWORD' without any login command.
C.Passing '--password-stdin' directly to 'podman pull'.
D.Using the '--authfile' flag pointing to a custom credentials file.
E.Providing username and password inline using '--creds username:password'.
AnswersA, D, E

Running podman login beforehand stores registry credentials in auth.json, which subsequent pulls read automatically. This satisfies the requirement by pre-authenticating the registry session, so no inline credentials or custom file path is needed at pull time.

Why this answer

Option A is correct because 'podman login' stores the registry credentials in the auth.json file (typically under $XDG_RUNTIME_DIR/containers/auth.json or ~/.config/containers/auth.json), and subsequent 'podman pull' operations automatically read those stored credentials. Option D is correct because the '--authfile' flag lets you point 'podman pull' at a custom credentials file in the same JSON format, which is useful for non-default credential locations or automation. Option E is correct because 'podman pull --creds username:password' supplies the credentials inline for that single command, authenticating directly against the private registry without a prior login.

Option B is not a valid mechanism: Podman does not read a 'PODMAN_PASSWORD' environment variable to authenticate pulls, so setting it alone has no effect. Option C is not valid because '--password-stdin' is an option of 'podman login' (to read the password from standard input), not of 'podman pull', so it cannot be passed directly to the pull command.

Exam trap

EX188 often tests the various authentication methods, and candidates mistakenly think environment variables like PODMAN_PASSWORD are used, or confuse '--password-stdin' as a pull flag rather than a login flag.

91
MCQmedium

Two containers running on the same custom user-defined bridge network need to communicate using container names as hostnames. What is required for this to work natively in Podman?

A.You must use the default 'podman' bridge network.
B.You must edit /etc/hosts inside the containers manually.
C.Nothing extra; user-defined bridge networks include built-in DNS resolution.
D.You must manually link containers using the --link flag.
AnswerC

Podman's user-defined bridge networks run an embedded DNS server, so containers on the same network resolve each other by container name automatically. No manual /etc/hosts entries or links are needed, satisfying the native hostname resolution requirement.

Why this answer

User-defined bridge networks in Podman (and Docker) include an embedded DNS resolver, typically at 127.0.0.11 inside each container, that resolves container names and network aliases to their current IP addresses. Because both containers are attached to the same custom network, Podman's DNS plugin (dnsname/aardvark-dns) automatically registers each container's name, so no manual /etc/hosts editing or --link is needed. This is a core advantage of user-defined networks over the default bridge, which lacks automatic name resolution.

Exam trap

EX188 often tests the misconception that container name resolution requires --link or manual /etc/hosts edits, when in fact user-defined networks provide built-in DNS automatically.

How to eliminate wrong answers

Option A is wrong because the default 'podman' bridge network does not provide automatic DNS-based name resolution between containers — only user-defined networks do. Option B is wrong because manually editing /etc/hosts is unnecessary and fragile; Podman's built-in DNS handles name resolution dynamically. Option D is wrong because --link is a legacy Docker feature that is deprecated and not required on user-defined networks, which already provide name-based connectivity.

92
MCQeasy

You need to define a persistent environment variable named 'PORT' with the value '8080' that is available during both the build process and when running containers from the resulting image. Which instruction should you use?

A.SET
B.ENV
C.VAR
D.EXPORT
AnswerB

ENV sets a persistent environment variable that remains in the image metadata, so it is available both during subsequent build steps and at container runtime. This directly satisfies the stem's requirement for a variable present across build and run, unlike ARG, which exists only at build time.

Why this answer

The ENV instruction in a Containerfile/Dockerfile sets an environment variable that persists both during subsequent build steps (RUN) and in the final image at runtime. Using ENV PORT=8080 makes PORT available to any process started from the resulting image, satisfying the requirement for build-time and runtime availability.

Exam trap

EX188 often tests the distinction between ENV (persists to runtime) and ARG (build-time only), and includes fabricated instructions like SET, VAR, or EXPORT to catch candidates who guess based on shell familiarity.

How to eliminate wrong answers

Option A is wrong because SET is not a valid Containerfile/Dockerfile instruction — it does not exist in the OCI image build spec. Option C is wrong because VAR is not a valid instruction; there is no VAR directive in Containerfile syntax. Option D is wrong because EXPORT is a shell builtin, not a Containerfile instruction — while you could use RUN export PORT=8080, that only affects the single RUN layer's shell and does not persist to the image or runtime.

93
MCQmedium

A team maintains a Podman Compose file where the application service must start only after the database service is healthy, not merely after its container is created. Which Compose construct expresses that health-based startup ordering?

A.depends_on with the long syntax including 'condition: service_healthy' alongside a healthcheck on the database service.
B.A restart policy of 'on-failure' on the application service so it retries until the database is ready.
C.depends_on with the short list syntax, for example 'depends_on: [db]'.
D.An 'extends' entry that inherits the database service's healthcheck into the application service.
AnswerA

The long form of 'depends_on' supports a 'condition' key, and 'service_healthy' waits until the dependency's healthcheck reports healthy before starting the dependent service. Pairing it with a healthcheck on the database service gives the application a real readiness gate rather than starting as soon as the database container is created.

Why this answer

Health-based startup ordering is expressed with the long form of 'depends_on' using a condition of service_healthy, combined with a healthcheck on the dependency. The short form only orders creation, restart policies react to failures, and 'extends' merges configuration. Only the conditional depends_on gives a true readiness gate before the dependent service starts.

Exam trap

The trap here is assuming that any 'depends_on' entry waits for the dependency to be healthy, when the short syntax only orders container creation and never checks health.

94
MCQeasy

Where are Podman named volumes typically stored on the host file system by default for a non-root user?

A./var/lib/containers/storage/volumes/
B./etc/containers/volumes/
C./var/run/containers/storage/
D.~/.local/share/containers/storage/volumes/
AnswerD

For a non-root user, Podman stores named volumes under the user's home directory because rootless containers cannot write to `/var/lib/containers`. The default rootless storage path is `~/.local/share/containers/storage`, with named volumes placed in its `volumes/` subdirectory, satisfying the non-root constraint in the stem.

Why this answer

For a non-root user, Podman stores named volumes under the user's home directory in ~/.local/share/containers/storage/volumes/ by default. This is because rootless Podman uses a separate storage location for each user, following the XDG Base Directory specification. The root user's volumes are stored in /var/lib/containers/storage/volumes/, but non-root users do not have write access there, so Podman uses the user-specific path.

Exam trap

EX188 often tests the distinction between rootful and rootless Podman storage paths, and candidates may incorrectly assume that all volumes are stored in /var/lib/containers/storage/volumes/ regardless of user context.

How to eliminate wrong answers

Option A is wrong because /var/lib/containers/storage/volumes/ is the default storage location for rootful Podman (when running as root), not for a non-root user. Option B is wrong because /etc/containers/volumes/ is not a standard Podman storage path; /etc/containers/ typically holds configuration files like registries.conf and policy.json, not volume data. Option C is wrong because /var/run/containers/storage/ is used for runtime state (e.g., temporary sockets and PID files) and is cleared on reboot, not for persistent volume storage.

95
MCQhard

A container named 'worker' was configured with a health check command during build time, but an administrator needs to temporarily override or define a new health check command while running the container. Which flag should be passed to 'podman run' to achieve this?

A.--check-command
B.--healthcheck-run
C.--health-cmd
D.--health-test
AnswerC

`--health-cmd` overrides the image's built-in HEALTHCHECK instruction at runtime, satisfying the requirement to temporarily replace the build-time command. Podman applies this new command when starting the container, so no rebuild is needed. Other flags such as `--health-interval` or `--health-retries` tune timing only, not the command itself.

Why this answer

The `--health-cmd` flag in `podman run` allows overriding the health check command defined in the image. It specifies a command to run inside the container to check its health. This is the correct flag to temporarily define or override a health check at runtime.

Exam trap

EX188 often tests the exact flag names for health checks, and candidates may confuse `--health-cmd` with non-existent flags like `--health-test` or `--check-command`.

How to eliminate wrong answers

Option A is wrong because `--check-command` is not a valid Podman flag. Option B is wrong because `--healthcheck-run` is not a valid Podman flag. Option D is wrong because `--health-test` is not a valid Podman flag; the correct flag is `--health-cmd`.

96
MCQhard

An organization mandates that all container images produced internally must be signed using local GPG keys before being pushed to the production registry. Which tool and configuration file must be used to enforce that Podman rejects unsigned images during a pull operation?

A./etc/containers/policy.json
B./etc/containers/registries.conf
C./var/lib/shared/sigstore
D.~/.config/containers/auth.json
AnswerA

Podman consults /etc/containers/policy.json on every pull, applying its signature policy to decide whether an image is accepted. Configuring a signedBy requirement there forces rejection of unsigned images, enforcing the mandated GPG signing before production registry pulls.

Why this answer

Signature enforcement for image pulls is controlled by /etc/containers/policy.json, which defines per-transport and per-registry requirements such as 'signedBy' with a GPG keyring. To reject unsigned images, the policy must specify a signedBy requirement (or 'reject') for the relevant registry scope, causing Podman to fail the pull if the signature is missing or invalid.

Exam trap

EX188 often tests whether candidates confuse registries.conf (registry access) with policy.json (signature enforcement), or mistakenly pick auth.json for signature policy.

How to eliminate wrong answers

Option B is wrong because /etc/containers/registries.conf configures registry endpoints, mirrors, and TLS settings, but does not enforce signature verification. Option C is wrong because /var/lib/shared/sigstore is not a standard Podman configuration path for signature policy; signatures are typically stored in /var/lib/containers/sigstore or referenced via registries.d. Option D is wrong because ~/.config/containers/auth.json stores registry credentials, not signature policy.

97
Multi-Selectmedium

Which TWO actions occur when a container is run with ephemeral storage (the default behavior without volume mounts)? (Choose TWO)

Select 2 answers
A.All container changes are written directly back to the read-only image layer
B.The container has its own writable scratchpad layer separate from the image
C.Data persists automatically across host reboots and container deletions
D.Data written to the container layer is lost when the container is removed
E.Host files are automatically synchronized into the container storage
AnswersB, D

A container image's layers are read-only, so any writes at runtime go to a thin writable layer created on top of the image. This copy-on-write scratchpad is unique to each container instance and persists only for that container's lifetime.

Why this answer

Option B is correct because when a container runs without any volume mounts, Docker (or a similar container runtime) creates a writable container layer on top of the read-only image layers, using a copy-on-write union filesystem such as overlay2; this scratchpad layer is where all runtime changes (new files, modified files, deleted files) are stored, keeping the underlying image immutable. Option D is correct because that writable layer is tied to the container's lifecycle: when the container is removed with docker rm (or docker run --rm), the layer and all data written to it are deleted, which is why ephemeral storage does not persist. Option A is wrong because image layers are read-only and are never written back to; changes go to the separate writable layer via copy-on-write.

Option C is wrong because ephemeral container-layer data does not survive container deletion or host reboots unless a volume or bind mount is used. Option E is wrong because host files are not automatically synchronized into container storage; host access requires an explicit bind mount or volume.

Exam trap

EX188 often tests whether candidates mistakenly believe container writes go back into the image or persist automatically, confusing ephemeral container layers with volume-backed persistence.

98
MCQmedium

An administrator has a container named legacy_api that has been stopped for several weeks. A teammate reports that the container's filesystem still contains an outdated configuration file at /etc/app/config.yml. The administrator wants to replace that file inside the stopped container's filesystem without starting it. Which command should the administrator use?

A.podman update --file ./config.yml legacy_api
B.podman cp ./config.yml legacy_api:/etc/app/config.yml
C.podman exec legacy_api sh -c 'echo > /etc/app/config.yml'
D.podman attach legacy_api sh
AnswerB

podman cp works on both running and stopped containers, copying files into or out of the container's filesystem. Since legacy_api is stopped, this command directly places the updated configuration at the target path in the container's writable layer, and the file will be present the next time the container starts.

Why this answer

podman cp transfers files between the host and a container's filesystem regardless of whether the container is running or stopped. Commands such as podman exec and podman attach require a running container, and podman update changes runtime resource settings rather than file contents, so podman cp is the only viable choice for modifying a stopped container's file.

Exam trap

The trap here is assuming file operations inside a container require the container to be running, which leads administrators to start a stopped container unnecessarily.

99
MCQeasy

Which instruction should be used in a Containerfile to copy local files from the host machine into the container filesystem?

A.COPY
B.TRANSFER
C.ADD
D.MOVE
AnswerA

COPY transfers files from the build context on the host into the image filesystem during a build. ADD also copies but additionally handles remote URLs and archive extraction, so COPY is the precise instruction for plain local file transfer into the container.

Why this answer

The `COPY` instruction in a Containerfile is used to copy files from the build context (host machine) into the container filesystem. It is the standard and recommended instruction for this purpose.

Exam trap

EX188 often tests the difference between `COPY` and `ADD`, and candidates may incorrectly choose `ADD` for simple file copying or invent instructions like `TRANSFER` or `MOVE`.

How to eliminate wrong answers

Option B is wrong because `TRANSFER` is not a valid Containerfile instruction. Option C is wrong because `ADD` is also used to copy files, but it has additional features like extracting tar archives and fetching remote URLs; however, `COPY` is the preferred instruction for simple file copying. Option D is wrong because `MOVE` is not a valid Containerfile instruction.

100
MCQeasy

An operator needs to troubleshoot a failing service inside a container named 'auth_api'. Which command should the operator run to view the standard output log stream generated by this container?

A.podman output auth_api
B.podman logs auth_api
C.podman events auth_api
D.podman history auth_api
AnswerB

podman logs retrieves the captured standard output and standard error stream of the named container, which is exactly the log stream required. The container name auth_api is passed directly, so no exec into the container or host journal query is needed.

Why this answer

The `podman logs` command retrieves the standard output (stdout) and standard error (stderr) logs from a container, exactly what the operator needs to troubleshoot the failing service. It works for both running and stopped containers, and supports options like `-f` to follow the stream in real time. This is the direct Podman equivalent of `docker logs`.

Exam trap

EX188 often tests the distinction between container runtime logs (`podman logs`) and system/container lifecycle events (`podman events`), causing candidates to confuse real-time event monitoring with application log retrieval.

How to eliminate wrong answers

Option A is wrong because `podman output` is not a valid Podman subcommand; there is no such command for retrieving container output. Option C is wrong because `podman events` monitors system-level container events (create, start, stop, die, etc.) in real time, not the application's stdout/stderr log stream. Option D is wrong because `podman history` displays the image layer history (similar to `docker history`), showing how an image was built, not runtime logs from a container.

101
MCQeasy

A running Podman container named 'dbapp' is unresponsive, and a technician needs to immediately and forcefully terminate it without waiting for a graceful shutdown timeout. Which Podman command should be executed?

A.podman stop --force dbapp
B.podman kill dbapp
C.podman terminate dbapp
D.podman rm -f dbapp
AnswerB

`podman kill dbapp` sends SIGKILL by default, terminating the container's processes immediately without the graceful stop timeout that `podman stop` honours. This satisfies the stem's requirement to forcefully terminate the unresponsive container at once, rather than waiting for a clean shutdown sequence.

Why this answer

The `podman kill` command sends a SIGKILL signal to the main process of the container by default, which immediately and forcefully terminates it without any graceful shutdown period. This matches the requirement to 'immediately and forcefully terminate' the unresponsive container. Unlike `podman stop`, which sends SIGTERM and waits for a timeout, `podman kill` does not wait and is the correct tool for this scenario.

Exam trap

EX188 often tests the difference between `podman stop` and `podman kill`, and candidates may incorrectly assume that `podman stop --force` exists or that `podman rm -f` is equivalent to killing a container.

How to eliminate wrong answers

Option A is wrong because `podman stop --force` does not exist; `podman stop` accepts a `--time` flag to set the timeout, but there is no `--force` option, and even if it did, it would still attempt a graceful stop first. Option C is wrong because `podman terminate` is not a valid Podman command; the correct command is `podman kill` or `podman stop`. Option D is wrong because `podman rm -f` forcefully removes a container, but it also deletes the container and its associated resources, which is not the same as simply terminating a running container; the question asks to terminate, not remove.

102
MCQmedium

An administrator wants to create a named volume called appdata and inspect its mount point on the host. Which sequence of commands should the administrator use?

A.podman volume add appdata then podman volume show appdata
B.podman volume create appdata then podman volume inspect appdata
C.podman volume new appdata then podman volume details appdata
D.podman create volume appdata then podman inspect volume appdata
AnswerB

The podman volume create command creates a named volume, and podman volume inspect displays detailed information about it, including the mount point on the host. This is the correct sequence to both create the volume and find its location. The inspect output includes fields such as Mountpoint, which shows where the data is stored on the host filesystem.

Why this answer

To create a named volume and inspect its host mount point, the administrator should use podman volume create followed by podman volume inspect. These are the correct subcommands for volume management in Podman. The other options use invalid command syntax that would not work.

Exam trap

The trap here is mixing up the order of 'volume' and 'create', as in podman create volume, which is invalid.

103
MCQmedium

A developer builds a custom image with `podman build -t app:v1 .` but repeatedly gets stale results because an earlier RUN layer that installs packages is cached, even though the repository metadata has changed. The developer wants to force podman to ignore all cached layers for the next build without deleting the local image or build cache. Which command accomplishes this?

A.podman build --pull=always -t app:v1 .
B.podman build --no-cache -t app:v1 .
C.podman build --layers=false -t app:v1 .
D.podman rmi app:v1 && podman build -t app:v1 .
AnswerB

The --no-cache flag tells podman to bypass the layer cache entirely and execute every instruction in the Containerfile from scratch, producing fresh layers even for unchanged instructions. It does not delete the local image or the stored cache; it simply instructs this build to avoid reusing cached layers, so the newly fetched repository metadata is honored during the RUN that installs packages.

Why this answer

The scenario is about stale cached layers during a build. The --no-cache flag is the documented podman build option that instructs podman to ignore the layer cache for that build and execute every Containerfile instruction fresh, which is exactly what is needed to pick up new repository metadata without deleting the local image or the cache store.

Exam trap

The trap here is assuming that removing the local image also clears the intermediate build cache layers, when in fact podman keeps cached layers separately and they can still be reused.

104
MCQhard

An administrator wants to retrieve only the IP address of a running container named web_svc by querying podman inspect with a specific format template. Which command is correct?

A.podman ps --format='{{ .IP }}' web_svc
B.podman inspect --ip web_svc
C.podman inspect --format='{{ .NetworkSettings.IPAddress }}' web_svc
D.podman inspect --query=ip web_svc
AnswerC

The `--format` flag applies a Go template directly to the inspect JSON, and `.NetworkSettings.IPAddress` is the exact field path holding the container's IPv4 address. This satisfies the stem's requirement to retrieve only the IP address, rather than dumping the full JSON document for web_svc.

Why this answer

podman inspect supports Go-template formatting via --format, and the container's IP address lives at .NetworkSettings.IPAddress in the inspect JSON. The command podman inspect --format='{{ .NetworkSettings.IPAddress }}' web_svc extracts exactly that field for the named container.

Exam trap

EX188 often tests whether candidates know that podman inspect uses Go-template --format syntax and the exact JSON path .NetworkSettings.IPAddress, rather than inventing flags like --ip or --query.

How to eliminate wrong answers

Option A is wrong because podman ps does not expose an .IP field in its format template — ps shows status, ports, names, and IDs, not IP addresses. Option B is wrong because podman inspect has no --ip flag; it only accepts --format, --type, and --size. Option D is wrong because podman inspect has no --query flag — that is a fabricated option; filtering is done exclusively through --format templates.

105
Multi-Selecthard

Which THREE mechanisms are part of Podman's image signature verification framework on RHEL 9? (Choose three.)

Select 3 answers
A.Signature storage backends (such as sigstore) where detached signatures are stored.
B.Automatic kernel SELinux policy compilation during image pull.
C.Built-in TLS client certificate authorities for registry TCP handshakes.
D.The policy configuration file (/etc/containers/policy.json) that defines required verification checks.
E.GnuPG public key rings or signature verification keys used to validate cryptographic signatures.
AnswersA, D, E

Detached signatures are fetched from configured storage backends such as sigstore, letting Podman retrieve the signature that corresponds to an image before validating it. This satisfies the stem's requirement for a signature verification framework mechanism.

Why this answer

Podman's image signature verification framework on RHEL 9 relies on three core components. Option A is correct because signature storage backends (for example, the sigstore backend configured in registries.d YAML files) define where detached signatures are fetched from and stored during verification. Option D is correct because /etc/containers/policy.json is the policy configuration file that specifies which repositories or transports require signature verification and what type of verification (such as signedBy) must pass.

Option E is correct because GnuPG public key rings (referenced via keyPath or keyData in policy.json) supply the cryptographic keys used to validate the detached image signatures. Option B is not part of this framework, since SELinux policy compilation is unrelated to image signature verification and is not triggered by image pulls. Option C is also incorrect because TLS client certificate authorities for registry handshakes belong to transport-level TLS authentication, not to Podman's signature verification framework.

Exam trap

The trap is that candidates conflate transport security (TLS client certs) or unrelated system hardening (SELinux policy compilation) with image signature verification, picking plausible-sounding but out-of-scope mechanisms.

106
MCQhard

An administrator wants to configure Podman to pull images using a specific TLS client certificate for mutual TLS authentication against a secure private registry. Where should the client certificate and private key be placed?

A./etc/containers/certs.d/registry.example.com/ (with client.cert and client.key)
B.~/.config/containers/tls/
C./etc/pki/tls/private/
D./etc/containers/auth.d/
AnswerA

Placing client.cert and client.key under /etc/containers/certs.d/registry.example.com/ satisfies Podman's per-registry TLS lookup, where the directory name must match the registry hostname. Podman automatically presents these files during mutual TLS negotiation, so no additional configuration flags are required for the private registry connection.

Why this answer

Podman (via containers/image) looks for registry-specific TLS client certificates in /etc/containers/certs.d/<registry-hostname>/, where files named client.cert and client.key provide the mutual TLS credentials. This is the documented location for per-registry TLS configuration.

Exam trap

The trap is confusing registry authentication (auth.json for username/password) with TLS client certificate authentication (certs.d for mTLS) — they use entirely different file locations and mechanisms.

How to eliminate wrong answers

Option B is wrong because ~/.config/containers/tls/ is not a recognized path for registry client certificates — Podman's per-registry cert directory is under /etc/containers/certs.d/. Option C is wrong because /etc/pki/tls/private/ is the system-wide TLS private key directory used by OpenSSL and web servers, not by Podman for registry authentication. Option D is wrong because /etc/containers/auth.d/ is not a standard directory — authentication credentials for registries are stored in /run/containers/0/auth.json or ${XDG_RUNTIME_DIR}/containers/auth.json, and that is for username/password or token auth, not TLS client certificates.

107
Multi-Selecthard

Which THREE actions occur when an administrator runs a container with an SELinux volume mount suffix ':Z'? (Choose three.)

Select 3 answers
A.The host path's SELinux context is altered to match the container's private category.
B.The SELinux enforcement mode on the host is temporarily set to permissive.
C.The mounted content is labeled with a private, unshared SELinux security context.
D.The host directory becomes completely read-only across all namespaces.
E.Only the specific container launched with the flag can access the labeled files under SELinux enforcement.
AnswersA, C, E

With :Z, the host directory's SELinux context is relabelled to carry the container's private MCS category, so the files match the container process's context. This satisfies the stem because enforcement requires the host path label to align with the container's category.

Why this answer

Option A is correct because the ':Z' suffix instructs the container runtime (e.g., podman/docker with SELinux) to relabel the host path's SELinux context, changing its type and adding a unique MCS category so it matches the container's private label. Option C is correct because ':Z' applies a private, unshared SELinux context (a unique category pair) to the mounted content, unlike ':z' which applies a shared label. Option E is correct because the private MCS category ensures that only the specific container launched with that flag can access the labeled files while SELinux is enforcing, preventing other containers from accessing them.

Option B is incorrect because ':Z' does not change the host's SELinux enforcement mode to permissive; enforcement remains as configured. Option D is incorrect because ':Z' only relabels the content and does not make the host directory read-only across all namespaces.

Exam trap

EX188 often tests the distinction between ':Z' (private) and ':z' (shared) SELinux relabeling, and candidates mistakenly think ':Z' changes enforcement mode or mount permissions.

108
MCQmedium

An administrator wants to monitor resource usage (CPU, memory, block I/O, network I/O) of all running containers in real-time. Which command provides this functionality?

A.podman stats
B.podman monitor resources
C.podman top
D.podman system df
AnswerA

`podman stats` streams live CPU, memory, block I/O and network I/O counters for all running containers, refreshing continuously until interrupted. It satisfies the real-time monitoring constraint directly, unlike `podman ps` (static snapshot) or `podman inspect` (point-in-time JSON). No cgroups files need manual reading.

Why this answer

podman stats displays real-time resource usage statistics (CPU, memory, block I/O, network I/O, and PIDs) for running containers, similar to docker stats. It continuously refreshes and can be filtered to specific containers. This is the direct command for live resource monitoring.

Exam trap

EX188 often tests confusion between podman top (processes) and podman stats (resource metrics), or invents plausible-sounding subcommands like 'podman monitor resources' that do not exist.

How to eliminate wrong answers

Option B is wrong because 'podman monitor resources' is not a valid Podman subcommand; Podman has no such command. Option C is wrong because podman top shows the running processes inside a container (like ps), not resource usage metrics such as CPU and memory percentages. Option D is wrong because podman system df reports disk usage of images, containers, and volumes, not live CPU/memory/network statistics.

109
MCQhard

When utilizing Podman Compose, how are service dependencies and container startup orders typically managed within the YAML structure?

A.By ordering the service keys alphabetically in the YAML file
B.Using the 'links' parameter exclusively
C.Through the 'startup_order' directive
D.Using the 'depends_on' configuration key under the service definition
AnswerD

The depends_on key declares which services must start before a given service, so Podman Compose orders container startup accordingly. It satisfies the stem's requirement for managing service dependencies directly within the YAML service definition, rather than relying on external orchestration or manual sequencing.

Why this answer

Podman Compose, like Docker Compose, uses the 'depends_on' key under a service definition to express startup dependencies. This ensures that when a service is started, its dependencies are started first, controlling the order in which containers are launched. The 'depends_on' key does not wait for the dependent service to be 'ready' (e.g., healthy), only that it has been started, unless combined with health checks and conditions in some versions.

Exam trap

EX188 often tests the misconception that 'links' or alphabetical ordering controls startup order, when in fact 'depends_on' is the correct key for dependency management.

How to eliminate wrong answers

Option A is wrong because ordering service keys alphabetically has no effect on startup order; YAML mapping order is not semantically meaningful for dependency resolution. Option B is wrong because the 'links' parameter is used for network aliasing and enabling service discovery, not for controlling startup order; it does not guarantee dependency order. Option C is wrong because there is no 'startup_order' directive in Podman Compose or Docker Compose; startup order is managed via 'depends_on' (and optionally health checks).

110
Multi-Selectmedium

Which TWO actions can be performed using the podman volume management command suite? (Choose two.)

Select 2 answers
A.Modify the size limit of an existing volume using podman volume resize
B.Display detailed low-level configuration of a volume using podman volume inspect
C.Encrypt a managed volume at rest using podman volume encrypt
D.Convert a bind mount to a named volume using podman volume convert
E.Remove all unused volumes using podman volume prune
AnswersB, E

podman volume inspect returns the volume's full low-level configuration, including mountpoint, driver, labels and options, in JSON form. This directly satisfies the stem's requirement for displaying detailed configuration, a capability unique to the inspect subcommand within the volume suite.

Why this answer

Option B is correct because `podman volume inspect` is a real subcommand of the `podman volume` suite that outputs detailed low-level JSON configuration for a named volume, including its mountpoint, driver, labels, and options. Option E is correct because `podman volume prune` is a valid subcommand that removes all volumes not currently referenced by any container, freeing unused storage. Option A is incorrect because there is no `podman volume resize` subcommand; volume size limits are not managed that way in Podman.

Option C is incorrect because `podman volume encrypt` does not exist; Podman does not provide a volume-encryption subcommand in its volume suite. Option D is incorrect because `podman volume convert` is not a real subcommand and bind mounts cannot be converted into named volumes via the volume management suite.

Exam trap

EX188 often tests command existence and syntax; candidates may assume commands like `resize` or `encrypt` exist because other container tools have them, but Podman's volume suite is limited.

111
MCQhard

An engineer needs to inspect the low-level configuration details, mount points, and driver options of a named volume named 'app_vol'. Which command provides this information in JSON format?

A.podman volume inspect app_vol
B.podman volume show app_vol
C.podman volume status app_vol
D.podman inspect volume app_vol
AnswerA

`podman volume inspect app_vol` returns the volume's full configuration as a JSON array, exposing Mountpoint, Driver, Options, Labels and Scope. This directly satisfies the stem's requirement for low-level mount point and driver detail in JSON, unlike `podman volume ls`, which lists names only.

Why this answer

'podman volume inspect app_vol' returns detailed JSON output including the volume's mount point, driver, labels, and options. This is the canonical command for retrieving low-level volume metadata in a machine-readable format.

Exam trap

The trap here is the reversed syntax 'podman inspect volume <name>' — candidates familiar with Docker's 'docker volume inspect' sometimes transpose the words, but Podman requires the resource type immediately after 'podman'.

How to eliminate wrong answers

Option B is wrong because 'podman volume show' is not a valid Podman subcommand — there is no 'show' verb under 'podman volume'. Option C is wrong because 'podman volume status' does not exist; status information is obtained via 'inspect' or 'ls'. Option D is wrong because the correct syntax is 'podman volume inspect <name>', not 'podman inspect volume <name>' — the latter would attempt to inspect a container or image literally named 'volume'.

112
MCQmedium

An application container requires multiple configuration variables defined in a local file named 'app.env'. Which flag loads these variables into the container environment?

A.podman run --env-file app.env myapp
B.podman run --config-file app.env myapp
C.podman run -e @app.env myapp
D.podman run --load-env app.env myapp
AnswerA

The --env-file flag reads the named local file and injects each KEY=VALUE pair as environment variables inside the container, so app.env's multiple configuration variables become available to the application at runtime without manual --env entries.

Why this answer

The --env-file flag is used with podman run to load environment variables from a file. The file should contain lines in the format VAR=value. This allows multiple variables to be set in the container environment without specifying each with -e.

Exam trap

EX188 often tests the correct flag for loading environment variables from a file, and candidates may confuse --env-file with other flags like --config-file or invalid syntax.

How to eliminate wrong answers

Option B is wrong because --config-file is not a valid podman run flag; podman uses --env-file for environment variables. Option C is wrong because -e @app.env is not valid syntax; the -e flag expects a single variable assignment, and the @ symbol is not used to read from a file. Option D is wrong because --load-env is not a valid podman run flag.

113
Multi-Selectmedium

Which THREE practices should be followed to optimize container image size and build caching when writing Containerfiles? (Choose three.)

Select 3 answers
A.Order Containerfile instructions from least frequently changing to most frequently changing to maximize cache hits.
B.Combine package installation and cache cleanup in a single RUN instruction to prevent cache retention across layers.
C.Avoid using .containerignore files so that all host files are always cached by Podman.
D.Use multi-stage builds to separate build-time dependencies from the final runtime image.
E.Install all debugging tools and heavy development SDKs in the final production stage.
AnswersA, B, D

Placing base dependencies before source code maximizes cache reuse.

Why this answer

Caching and layer minimization depend on instruction order, cleanup in the same layer, and avoiding unnecessary tool installation.

114
Multi-Selecthard

Which THREE tasks can be performed using the 'podman system' command set? (Choose three.)

Select 3 answers
A.Configuring system-wide kernel sysctl parameters for container networking.
B.Displaying storage disk space usage statistics with 'podman system df'.
C.Running an API-serving background listener with 'podman system service'.
D.Automatically updating all running systemd container services.
E.Cleaning up unused containers, images, and networks with 'podman system prune'.
AnswersB, C, E

The df subcommand reports disk space consumed by images, containers and volumes, mirroring the storage accounting administrators expect. It fulfils the question's requirement for a reporting task within the podman system command set, distinct from runtime or lifecycle operations.

Why this answer

Option B is correct because 'podman system df' reports disk space usage statistics for Podman-managed storage, showing total, active, and reclaimable space for images, containers, and volumes. Option C is correct because 'podman system service' starts a background process that exposes the Podman REST API (Docker-compatible) on a socket, enabling remote clients to manage containers. Option E is correct because 'podman system prune' removes unused containers, images, networks, and optionally volumes, reclaiming storage.

Option A is not part of the 'podman system' command set; sysctl parameters are configured via 'sysctl' or container runtime settings, not Podman. Option D is also not provided by 'podman system'; automatic updates of systemd container services are handled by tools like 'podman auto-update' or systemd timers, not the 'podman system' subcommands.

Exam trap

EX188 often tests whether candidates assume 'podman system' covers sysctl tuning or auto-updates, when those belong to sysctl and 'podman auto-update' respectively.

115
MCQhard

You are using Podman Compose to define a multi-service application. The 'web' service must resolve the hostname 'db' to the 'db' service container's IP address, and the 'db' service must not be reachable from outside the Compose network. Which Compose configuration achieves this?

A.Use network_mode: host for both services and rely on the host's DNS resolution.
B.Define both services in the same Compose file without any networks section, and publish the db service port to the host.
C.Define a custom network, attach both services to it, and do not publish any ports for the db service.
D.Attach the web service to a custom network and the db service to the default network, then use links to connect them.
AnswerC

A user-defined network provides automatic DNS resolution between containers on that network, so 'web' can resolve 'db'. By not publishing ports for the db service, it remains accessible only to containers on the same network, satisfying the isolation requirement. This is the standard Podman Compose pattern for secure inter-service communication.

Why this answer

A user-defined Compose network enables automatic DNS resolution among attached services, so the web service can reach the db service by its service name. Keeping the db service off any published host port ensures it is not externally reachable. Using host networking or split networks breaks name resolution or isolation, and publishing the db port defeats the security goal.

Exam trap

The trap here is believing that service name resolution works across different networks or with host networking, when it requires a shared user-defined network.

116
Multi-Selectmedium

Which TWO configuration files or directories are routinely modified when establishing secure private container registry trust and signature policies on RHEL 9? (Choose two.)

Select 2 answers
A./etc/fstab
B./etc/containers/registries.conf
C./etc/hosts
D./etc/passwd
E./etc/containers/policy.json
AnswersB, E

registries.conf defines which registries Podman and CRI-O may contact, including unqualified-search registries and per-registry mirrors or blocks. Editing it establishes the trusted private registry endpoints required before signature verification can be enforced, satisfying the stem's secure registry trust requirement.

Why this answer

Option B, /etc/containers/registries.conf, is correct because it is the primary configuration file used by container tools such as Podman and Skopeo to define registry trust settings, including which registries are allowed, blocked, or treated as insecure, and it can reference registry-specific configuration directories. Option E, /etc/containers/policy.json, is correct because it defines the signature verification policy that container engines apply when pulling images, specifying which keys or signed identities are trusted for particular registries or repositories. Together, these files establish both registry access trust and image signature enforcement on RHEL 9.

Option A, /etc/fstab, is incorrect because it defines filesystem mount points and has nothing to do with container registry trust. Option C, /etc/hosts, is incorrect because it only provides static hostname-to-IP mappings. Option D, /etc/passwd, is incorrect because it stores local user account information, not container registry or signature policy settings.

Exam trap

EX188 often tests whether candidates confuse registry configuration (registries.conf) with signature enforcement (policy.json), leading them to pick only one file when both are required.

117
MCQmedium

A system administrator is auditing containers and notices one running with the option '--security-opt label=disable'. What does this flag do?

A.It turns off SELinux separation and labeling for the container.
B.It disables seccomp system call filtering.
C.It disables user namespace mapping.
D.It disables AppArmor enforcement.
AnswerA

Disabling SELinux labelling removes the mandatory access control confinement Podman applies to the container, satisfying the stem's audit concern about reduced isolation. Processes then run under the container runtime's default type without per-container category labels, so they are no longer separated from other containers on the host.

Why this answer

The '--security-opt label=disable' flag in Podman disables SELinux labeling for the container. This means that the container processes are not confined by SELinux policies, and the container can access files without SELinux context restrictions. This is often used when SELinux is causing permission issues, but it reduces security.

The flag specifically turns off SELinux separation, not seccomp, user namespaces, or AppArmor.

Exam trap

The trap is confusing SELinux labeling with other security mechanisms like seccomp, AppArmor, or user namespaces. Candidates might think 'label=disable' disables all security features, but it specifically targets SELinux.

How to eliminate wrong answers

Option B is wrong because seccomp filtering is disabled using '--security-opt seccomp=unconfined', not 'label=disable'. Option C is wrong because user namespace mapping is controlled by '--userns' options, not by 'label=disable'. Option D is wrong because AppArmor enforcement is disabled using '--security-opt apparmor=unconfined', not 'label=disable'.

118
MCQhard

You are building an image with a multi-stage Containerfile. The final stage uses `FROM registry.access.redhat.com/ubi9/ubi-minimal` and you want to copy only the compiled binary from a builder stage named `builder` into `/usr/local/bin/app`. Which Containerfile line correctly copies that artifact?

A.RUN cp --from=builder /src/app /usr/local/bin/app
B.COPY --from=0 /src/app /usr/local/bin/app
C.ADD --stage=builder /src/app /usr/local/bin/app
D.COPY --from=builder /src/app /usr/local/bin/app
AnswerD

The COPY instruction supports the --from flag, which references a previous build stage by its name or index. Here, `builder` is the named stage, so COPY --from=builder pulls the compiled artifact from that stage's filesystem into the final image. This keeps the final image minimal because only the binary is transferred, not the entire build toolchain.

Why this answer

Multi-stage builds let you copy artifacts from a named or indexed earlier stage using COPY --from=<stage>. Because the scenario names the stage `builder`, the correct line references that name. This transfers only the compiled binary into the minimal final image, keeping the runtime image small and free of build tooling.

Exam trap

The trap here is confusing the --from flag (a COPY feature for referencing build stages) with an imaginary --stage flag or with runtime shell commands.

119
MCQeasy

Which command displays disk space usage statistics for Podman storage, including volumes and containers?

A.podman system df
B.podman disk status
C.podman volume df
D.podman storage usage
AnswerA

`podman system df` reports disk usage across Podman's storage, listing images, containers and volumes with total, active and reclaimable space. It directly satisfies the stem's requirement to display disk space statistics covering volumes and containers.

Why this answer

The correct command is `podman system df`. This command provides a summary of disk space usage for Podman's storage, including images, containers, and volumes. It is analogous to `docker system df` and is the standard way to inspect storage consumption in Podman.

Exam trap

EX188 often tests the confusion between Docker and Podman command syntax, leading candidates to assume `podman disk` or `podman storage` subcommands exist when they do not.

How to eliminate wrong answers

Option B is wrong because `podman disk status` is not a valid Podman subcommand; Podman does not have a `disk` command group. Option C is wrong because `podman volume df` is not a valid command; while `podman volume` exists, it does not have a `df` subcommand. Option D is wrong because `podman storage usage` is not a valid command; Podman's storage-related commands are under `podman system` (e.g., `podman system df`).

120
Multi-Selecthard

When configuring container mounts using the --mount flag, which THREE key-value pairs are valid parameters in the option string? (Choose three.)

Select 3 answers
A.destination
B.source
C.permission
D.owner
E.type
AnswersA, B, E

The `destination` key-value pair sets the container-side mount path, satisfying the requirement that `--mount` accepts explicit target parameters. Unlike `--volume`, which uses positional arguments, `--mount` requires named keys such as `destination` (or its alias `target`) to define where the volume appears inside the container.

Why this answer

The --mount flag accepts a comma-separated list of key=value pairs, and the three valid keys among the choices are type, source, and destination. Option E (type) is correct because it specifies the mount type, such as type=bind, type=volume, or type=tmpfs, which determines how the mount is handled. Option B (source) is correct because it identifies the source of the mount, such as a host path for a bind mount or a named volume for a volume mount.

Option A (destination) is correct because it sets the path inside the container where the filesystem is mounted, for example destination=/app/data. Option C (permission) is not a valid --mount key; read/write control is expressed with the read-only or ro key (or --read-only), not permission. Option D (owner) is also not a valid --mount key, since ownership is determined by the underlying filesystem and container user, not by a mount option string parameter.

Exam trap

EX188 often tests the exact key names accepted by --mount, and candidates confuse the 'ro'/'rw' option (a value, not a key) with a nonexistent 'permission' key.

121
MCQeasy

An administrator needs to inspect the low-level configuration of a running container named net_tool, including its network settings, mounted volumes, and environment variables, in a JSON format for automation. Which command should the administrator use?

A.podman top net_tool
B.podman inspect net_tool
C.podman ps --format json net_tool
D.podman logs net_tool
AnswerB

The podman inspect command outputs detailed JSON-formatted information about a container, including its configuration, network settings, mounts, environment variables, and more. It is the standard tool for retrieving low-level container metadata and is ideal for automation because the output is structured and parseable. This command directly fulfills the requirement to inspect the container's configuration in JSON format.

Why this answer

The podman inspect command provides comprehensive JSON output about a container's configuration, including network settings, volumes, environment variables, and other metadata. It is the correct tool for obtaining low-level details in a machine-readable format. Other commands like podman ps, podman logs, and podman top offer limited or unrelated information and do not fulfill the requirement for detailed configuration inspection.

Exam trap

The trap here is confusing podman ps --format json with podman inspect; the former only lists summary information and does not provide full configuration details.

122
MCQmedium

An administrator needs to run a container named 'web01' using Podman in the background using the image registry.access.redhat.com/ubi8/httpd-24:latest. Which command correctly starts this container in detached mode and maps port 8080 on the host to port 80 in the container?

A.podman start -d --name web01 -p 8080:80 registry.access.redhat.com/ubi8/httpd-24:latest
B.podman container create -d --name web01 -p 8080:80 registry.access.redhat.com/ubi8/httpd-24:latest
C.podman run -d --name web01 -p 8080:80 registry.access.redhat.com/ubi8/httpd-24:latest
D.podman run -b --name web01 -p 80:8080 registry.access.redhat.com/ubi8/httpd-24:latest
AnswerC

The -d flag detaches the container, --name assigns web01, and -p 8080:80 maps host port 8080 to container port 80. The image reference follows, giving the correct Podman invocation for background execution with the required port mapping.

Why this answer

'podman run' is the command that creates and starts a container in one step, and -d puts it in detached (background) mode. The -p 8080:80 flag maps host port 8080 to container port 80 in the correct host:container order, and --name web01 assigns the required container name. This is the canonical Podman invocation for starting a named, detached, port-mapped container.

Exam trap

EX188 often tests the host:container order of the -p flag and the distinction between 'podman run' (create+start) versus 'podman create'/'podman start' (separate steps), catching candidates who reverse the port mapping or use the wrong lifecycle command.

How to eliminate wrong answers

Option A is wrong because 'podman start' only starts an existing, already-created container — it does not accept an image reference or create a new container, so passing the image name and -p flags will fail. Option B is wrong because 'podman container create' only creates the container without starting it, and -d is not meaningful for create; the container would exist but not run. Option D is wrong because -b is not a valid Podman flag (it is not the detach flag), and the port mapping is reversed — 80:8080 would map host port 80 to container port 8080, which is backwards from the requirement.

123
Multi-Selecthard

Which THREE statements accurately describe the differences between shell form and exec form for CMD and ENTRYPOINT instructions? (Choose three.)

Select 3 answers
A.Shell form is mandatory when using multi-stage builds.
B.Exec form allows shell variable expansion (like $VAR) directly without needing explicit shell invocation.
C.Exec form ensures that Unix signals (such as SIGTERM) sent by Podman are received directly by the application process as PID 1.
D.Exec form is written using JSON array syntax (e.g., ["executable", "param"]).
E.Shell form automatically wraps the command with '/bin/sh -c', which causes the application to run as a child process rather than PID 1.
AnswersC, D, E

In exec form the executable becomes PID 1 directly, so signals such as SIGTERM sent by Podman reach the application itself. This enables correct signal handling and graceful termination, unlike shell form where a shell intercepts them.

Why this answer

Option C is correct because in exec form the specified executable is launched directly as PID 1, so signals like SIGTERM sent by Podman (or Docker) are delivered straight to the application, enabling proper graceful shutdown. Option D is correct because exec form uses JSON array syntax such as ["executable", "param"], which is the defining syntactic characteristic of exec form in CMD and ENTRYPOINT instructions. Option E is correct because shell form implicitly wraps the command with '/bin/sh -c', so the shell becomes PID 1 and the actual application runs as a child process, which can prevent it from receiving signals directly.

Option A is incorrect because shell form is not mandatory in multi-stage builds; both shell and exec forms work in any build stage. Option B is incorrect because exec form does not perform shell variable expansion of things like $VAR unless you explicitly invoke a shell (e.g., ["/bin/sh", "-c", "echo $VAR"]); it is shell form that provides implicit variable expansion.

Exam trap

EX188 often tests the nuances of shell vs exec form, and candidates may incorrectly believe that exec form supports shell variable expansion or that shell form is required for multi-stage builds.

124
MCQmedium

An administrator needs to inspect the configuration details, including subnet and gateway, of an existing custom network named 'my-net'. Which command should be executed?

A.podman network show my-net
B.podman network details my-net
C.podman network inspect my-net
D.podman inspect network my-net
AnswerC

The inspect subcommand reads the stored network configuration and prints JSON detailing subnet, gateway and driver settings for my-net. Unlike listing commands, which show only names, inspect exposes the full definition, satisfying the requirement to view subnet and gateway details.

Why this answer

The correct command is 'podman network inspect my-net'. The 'inspect' subcommand returns detailed JSON output about the network, including subnet, gateway, and connected containers. It is the standard way to view network configuration.

Exam trap

EX188 often tests the exact subcommand syntax, confusing 'inspect' with non-existent verbs like 'show' or 'details', or misplacing the object type.

How to eliminate wrong answers

Option A is wrong because 'podman network show' is not a valid subcommand; 'show' does not exist for network operations. Option B is wrong because 'podman network details' is not a valid subcommand; the correct verb is 'inspect'. Option D is wrong because 'podman inspect network my-net' uses incorrect syntax — 'podman inspect' takes an object name or ID, not a type keyword like 'network'; the correct form is 'podman network inspect'.

125
MCQmedium

You are using a multi-stage build in your Containerfile. How do you copy a compiled binary named 'app' from a build stage named 'builder' into your final production runtime stage?

A.COPY --stage=builder /app /app
B.ADD --stage-name=builder /app /app
C.IMPORT --from=builder /app /app
D.COPY --from=builder /app /app
AnswerD

The COPY --from=builder instruction pulls artefacts from the named earlier build stage rather than the build context, copying the compiled binary at /app into the final runtime image. This satisfies the multi-stage requirement to exclude build tooling from production.

Why this answer

The COPY instruction in a Containerfile supports the --from=<stage> flag, which references a previously named build stage (e.g., 'builder') and copies artifacts from that stage's filesystem into the current stage. This is the canonical multi-stage build pattern for producing slim runtime images that exclude compilers, SDKs, and build dependencies. The syntax COPY --from=builder /app /app copies the compiled binary from the builder stage's /app path into the final stage's /app path.

Exam trap

EX188 often tests Containerfile instruction syntax, and candidates confuse COPY flags with Docker Compose or Kubernetes keywords, or assume ADD is the general-purpose copy instruction when COPY is the correct one for cross-stage copies.

How to eliminate wrong answers

Option A is wrong because --stage is not a valid COPY flag; the correct flag is --from, and using --stage would cause a build error. Option B is wrong because ADD does not support a --stage-name flag, and ADD is intended for URL/tarball retrieval rather than cross-stage copying. Option C is wrong because IMPORT is not a Containerfile instruction at all — it is not part of the Dockerfile/Containerfile specification.

126
Multi-Selecteasy

An administrator wants to check container port mappings and process listings inside containers. Which TWO commands provide these insights? (Choose TWO)

Select 2 answers
A.podman port
B.podman ps-ports
C.podman processes
D.podman top
E.podman netstat
AnswersA, D

The podman port command queries a running container's network namespace and prints its published and exposed port mappings, directly satisfying the requirement to inspect container port mappings without entering the container or inspecting the host firewall.

Why this answer

Option A, `podman port`, is correct because it displays the port mappings for a container, showing which container ports are forwarded to which host ports, exactly the insight the administrator needs for port mappings. Option D, `podman top`, is correct because it runs a process listing inside a running container (similar to `ps`), letting the administrator inspect the processes running within that container. Option B, `podman ps-ports`, is not a valid podman subcommand, so it cannot provide port mapping information.

Option C, `podman processes`, is not a valid podman subcommand for listing processes. Option E, `podman netstat`, is not a valid podman subcommand; network inspection is done via other tools or commands, not `podman netstat`.

Exam trap

EX188 often tests the exact syntax of Podman commands, and candidates may confuse podman port with podman ps-ports or assume that podman processes is a valid command.

127
MCQeasy

An administrator needs to view all network ports exposed or mapped by a container named web_prod using a simplified summary command. Which command can be used?

A.podman port web_prod
B.podman show-ports web_prod
C.podman network list-ports web_prod
D.podman inspect --ports web_prod
AnswerA

podman port lists the port mappings for a named container, showing each exposed container port and its host binding in a concise summary. It satisfies the requirement to view all ports exposed or mapped by web_prod without inspecting full container configuration.

Why this answer

podman port is the dedicated subcommand that prints the port mappings (published and exposed) for a container in a compact, human-readable summary format. It mirrors docker port and is the intended tool when you want a quick listing rather than the full JSON dump from podman inspect.

Exam trap

EX188 often tests whether candidates know the exact subcommand name — podman port (singular, no flags) versus invented variants like show-ports or inspect --ports.

How to eliminate wrong answers

Option B is wrong because podman has no show-ports subcommand — it is a fabricated command. Option C is wrong because podman network list-ports does not exist; podman network only supports subcommands like create, ls, inspect, connect, and disconnect. Option D is wrong because podman inspect does not accept a --ports flag; port information is only available via the full JSON output or by filtering with --format.

128
MCQeasy

How do you check the logs of all services managed by a Podman Compose file?

A.podman-compose monitor
B.podman-compose logs
C.podman-compose output
D.podman logs --compose
AnswerB

The logs subcommand aggregates stdout and stderr from every container defined in the Compose file, streaming them with service-name prefixes. Running it against the compose file satisfies the requirement to inspect all managed services at once, whereas podman logs only targets a single named container.

Why this answer

'podman-compose logs' displays log output from all services defined in the compose file.

129
MCQhard

You are optimizing a Containerfile for a Python application. The build currently uses a single RUN instruction that installs dependencies, runs tests, and cleans up temporary files. You want to leverage build caching to speed up rebuilds when only application code changes, while ensuring that dependency installation is cached separately. Which approach best achieves this?

A.Split the RUN instruction into multiple RUN instructions, placing the dependency installation before the COPY of application code.
B.Add a .containerignore file to exclude application code from the build context.
C.Use a multi-stage build where the first stage installs dependencies and the second stage copies them.
D.Keep the single RUN instruction but add a cache mount for the package manager.
AnswerA

This approach separates dependency installation from application code copying. Podman caches each instruction layer. Since dependencies change infrequently, their layer remains cached when only code changes, avoiding reinstallation. The COPY of code invalidates subsequent layers, but dependencies are already cached. This optimizes rebuild time and is a best practice for leveraging build caching effectively.

Why this answer

To optimize caching, dependencies should be installed in a layer that remains unchanged when application code changes. Placing dependency installation in a RUN instruction before COPYing the application code ensures that the dependency layer is cached and reused. Subsequent code changes only invalidate the COPY and later layers, not the dependency installation.

This minimizes rebuild time and is a common pattern in Containerfile optimization.

Exam trap

The trap here is thinking that a cache mount or multi-stage build alone solves caching for dependency installation, when the key is ordering instructions so that infrequently changed steps are cached before frequently changed code is copied.

130
MCQeasy

How can an administrator remove an existing Podman secret named 'old_secret'?

A.podman rm secret old_secret
B.podman secret rm old_secret
C.podman secret delete old_secret
D.podman secret remove old_secret
AnswerB

The podman secret rm subcommand deletes the named secret from Podman's secret store, removing it so containers can no longer reference it. The syntax matches the resource type followed by the verb and the secret's name.

Why this answer

The correct Podman command to remove a secret is 'podman secret rm <name>'. Podman's secret subcommand follows the same verb pattern as other resource subcommands (rm for remove), so 'podman secret rm old_secret' deletes the named secret from Podman's secret store.

Exam trap

EX188 often tests whether candidates assume Docker-style or generic verbs like 'delete' or 'remove' work in Podman — the exam expects knowledge that Podman standardizes on 'rm' across all resource subcommands.

How to eliminate wrong answers

Option A is wrong because 'podman rm secret old_secret' uses the container-removal command 'podman rm' with 'secret' as a container name, which will fail — podman rm only removes containers. Option C is wrong because 'delete' is not a valid Podman subcommand verb; Podman uses 'rm' consistently. Option D is wrong because 'remove' is not a valid Podman subcommand verb either, even though it is the English expansion of 'rm'.

131
MCQhard

An auditor notices that a container running with SELinux enforcement needs to access a specific host directory with a private read-write security context. Which SELinux suffix should be applied to the volume mount if the content is exclusive to that single container and should not be shared?

A.:z
B.:Z
C.:private
D.:seclabel
AnswerB

The :Z suffix relabels the host directory with a private, unshared SELinux context tied to that container, permitting read-write access under enforcement. The shared :z variant would allow multiple containers, so :Z satisfies the exclusivity constraint.

Why this answer

The `:Z` suffix applies a private, unshared SELinux label to the volume mount, meaning the content is exclusively accessible by that single container. This is appropriate when the host directory should not be shared with other containers, as it relabels the content with a unique MCS category.

Exam trap

EX188 often tests the distinction between `:z` (shared) and `:Z` (private); candidates confuse the two and pick `:z` when exclusive access is required, or invent non-existent options like `:private`.

How to eliminate wrong answers

Option A is wrong because `:z` applies a shared label, allowing multiple containers to access the same content, which contradicts the requirement for exclusive access. Option C is wrong because `:private` is not a valid SELinux mount suffix in Podman; the valid suffixes are `z` and `Z`. Option D is wrong because `:seclabel` is not a valid Podman volume option; it is a mount option in some contexts but not used for this purpose.

132
MCQmedium

A developer wants to push a locally built container image named webapp:v1 to a private container registry located at registry.local:5000/myteam/. Which sequence of commands correctly tags and pushes the image?

A.podman push webapp:v1 --registry registry.local:5000/myteam/
B.podman tag localhost/webapp:v1 registry.local:5000/myteam/webapp:v1 followed by podman push registry.local:5000/myteam/webapp:v1
C.podman commit webapp:v1 registry.local:5000/myteam/webapp:v1
D.podman export webapp:v1 > registry.local:5000/myteam/webapp:v1.tar
AnswerB

The tag command creates a new reference pointing the local image at the registry's fully qualified repository path, which podman push then requires. Pushing that tagged reference uploads the image to registry.local:5000/myteam/, satisfying the private registry target.

Why this answer

The correct workflow requires first creating a new tag that includes the full registry path (registry.local:5000/myteam/webapp:v1) pointing to the existing local image, then pushing that fully-qualified reference. The 'podman tag' command creates an additional name for the same image without copying layers, and 'podman push' uses the registry-qualified name to determine the destination. This two-step approach is required because podman push does not accept a separate --registry flag to redirect an existing local name.

Exam trap

EX188 often tests whether candidates confuse the tagging step with the push step — many assume podman push accepts a destination registry argument, but the registry must be part of the image name created by podman tag.

How to eliminate wrong answers

Option A is wrong because 'podman push' has no '--registry' flag; the destination registry must be encoded in the image reference itself. Option C is wrong because 'podman commit' creates a new image from a running container's filesystem changes and does not tag or push to a registry. Option D is wrong because 'podman export' writes a container's filesystem as a tar archive to stdout; it does not push images to a registry and the redirection syntax is invalid for registry operations.

133
MCQhard

When generating a Kubernetes Pod YAML from a Podman container using 'podman generate kubernetes', how are published ports mapped into the resulting Kubernetes manifest?

A.They are translated into container port definitions within the containers spec array.
B.They are converted into host-level iptables rules embedded in annotations.
C.They are ignored entirely and must be added manually.
D.They cause the generation command to fail with a port conflict error.
AnswerA

Podman's published ports become containerPort entries inside the containers spec array, since Kubernetes Services, not the Pod manifest, handle host-level exposure. This satisfies the stem's requirement that published ports map into the generated manifest as container port definitions.

Why this answer

When generating a Kubernetes Pod YAML from a Podman container, published ports are translated into containerPort entries within the containers spec array. This reflects the container's exposed ports in the Kubernetes manifest, allowing the Pod to declare which ports it listens on.

Exam trap

EX188 often tests the mapping of Podman features to Kubernetes YAML; candidates may think ports are ignored or converted to hostPort, but they become containerPort entries.

How to eliminate wrong answers

Option B is wrong because Kubernetes manifests do not embed iptables rules; networking is handled by the CNI plugin and kube-proxy, not by annotations. Option C is wrong because published ports are not ignored; they are included as containerPort definitions. Option D is wrong because port conflicts do not cause the generation command to fail; the command simply translates the configuration.

134
MCQeasy

An administrator needs to pause all processes inside a running container named db_master without stopping it. Which command accomplishes this?

A.podman suspend db_master
B.podman freeze db_master
C.podman hold db_master
D.podman pause db_master
AnswerD

`podman pause db_master` sends SIGSTOP to every process in the container's cgroup, freezing execution while leaving the container running and its state intact. This satisfies the requirement to suspend all processes without stopping the container, unlike `podman stop`, which terminates it.

Why this answer

The `podman pause` command sends the SIGSTOP signal to all processes inside the specified container, freezing their execution without terminating the container or its processes. This allows the container to be resumed later with `podman unpause`, which sends SIGCONT. Unlike stopping, the container's state and memory are preserved.

Exam trap

EX188 often tests the distinction between pause/unpause and stop/start, tricking candidates who assume 'suspend' or 'freeze' are valid Podman verbs when only pause/unpause exist in the Podman CLI.

How to eliminate wrong answers

Option A is wrong because `podman suspend` is not a valid Podman subcommand — there is no suspend verb in the Podman CLI. Option B is wrong because `podman freeze` is not a Podman command; freeze is a concept used in CRI-O (crictl) but not exposed as a Podman subcommand. Option C is wrong because `podman hold` does not exist in Podman; hold is not a recognized Podman operation.

135
MCQmedium

You want to create a Podman network with a specific subnet and gateway. Which command correctly specifies these parameters?

A.podman network create --subnet 192.168.200.0/24 --gateway 192.168.200.1 customnet
B.podman network create --ip-range 192.168.200.0/24 customnet
C.podman network new --subnet=192.168.200.0/24 customnet
D.podman network create customnet --network 192.168.200.0/24
AnswerA

The `--subnet` and `--gateway` flags on `podman network create` define the CNI bridge network's address range and default router directly, satisfying the stem's requirement for a specific subnet and gateway. Both parameters are applied at creation time, so the resulting `customnet` network uses 192.168.200.0/24 with 192.168.200.1 as its gateway.

Why this answer

The `podman network create` command accepts `--subnet` to define the CIDR block and `--gateway` to set the gateway IP for the new network, with the network name as the positional argument at the end. Option A uses both flags correctly with valid syntax, creating a network named `customnet` on 192.168.200.0/24 with gateway 192.168.200.1. This is the canonical form documented in podman-network-create(1).

Exam trap

EX188 often tests flag-name confusion — candidates pick `--ip-range` thinking it defines the subnet, or invent a `--network` flag on `network create` because they've seen it on `podman run`.

How to eliminate wrong answers

Option B is wrong because `--ip-range` only restricts the pool of addresses Podman allocates to containers within a subnet; it does not define the subnet itself, and no gateway is specified. Option C is wrong because `podman network` has no `new` subcommand — the correct verb is `create`. Option D is wrong because `--network` is not a valid flag for `podman network create`; the network name is a positional argument, not passed via `--network` (which is used on `podman run` to attach a container to a network).

136
MCQeasy

A user running a rootless container needs to inspect which subordinate UID and GID ranges have been allocated to their user account on the RHEL 9 host. Which files define these mappings?

A./etc/subuid and /etc/subgid
B./etc/passwd and /etc/group
C./etc/security/limits.conf
D.~/.config/containers/storage.conf
AnswerA

Rootless containers rely on user namespaces, so the kernel must map the unprivileged account's UID/GID to a wider range. /etc/subuid and /etc/subgid hold those per-user subordinate allocations, letting the user inspect exactly which ranges are assigned on the RHEL 9 host.

Why this answer

The /etc/subuid and /etc/subgid files define the subordinate UID and GID ranges allocated to each user for rootless container mapping. Each line is user:start:count, and Podman reads these to build the user namespace mappings. Inspecting them shows exactly which host UIDs/GIDs the user's containers can use.

Exam trap

EX188 often tests where subordinate ID mappings live, and candidates confuse /etc/passwd (primary IDs) with /etc/subuid and /etc/subgid (subordinate ranges).

How to eliminate wrong answers

Option B is wrong because /etc/passwd and /etc/group define the user's primary UID/GID and group memberships, not the subordinate ranges used for container mapping. Option C is wrong because /etc/security/limits.conf sets resource limits (nofile, nproc), not UID/GID mappings. Option D is wrong because ~/.config/containers/storage.conf configures storage driver and graph root, not subordinate ID allocation.

137
MCQmedium

An operator runs a Podman container and needs to inspect its assigned IP address directly from the container's runtime inspection output. Which command filters the JSON output to show only the IP address?

A.podman show-ip container_name
B.podman inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name
C.podman network ip container_name
D.podman inspect --ip container_name
AnswerB

Podman stores each network's IP under NetworkSettings.Networks, so the Go template must range over that map to reach IPAddress; a bare .NetworkSettings.IPAddress returns nothing. The --format flag applies this template to the inspect JSON, printing only the address.

Why this answer

Podman stores container runtime metadata in a JSON structure accessible via 'podman inspect'. The Go template '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' iterates over the Networks map and prints only the IPAddress field, which is exactly the filtering behavior required. This avoids dumping the full JSON and isolates the assigned IP.

Exam trap

EX188 often tests whether candidates know that Podman inspection filtering requires Go templates via --format, not a dedicated --ip flag or subcommand.

How to eliminate wrong answers

Option A is wrong because 'podman show-ip' is not a valid Podman subcommand. Option C is wrong because 'podman network ip' does not exist; network inspection uses 'podman network inspect'. Option D is wrong because 'podman inspect' has no --ip flag — filtering must be done with --format and a Go template.

138
MCQmedium

You are running a rootless Podman container that serves a web application on port 8080. You want users on other machines in the 192.168.1.0/24 subnet to reach the service by connecting to the host's IP address on port 8080. The host's firewall allows the traffic. Which command correctly publishes the container port?

A.podman run -d -p 192.168.1.0/24:8080:8080 myapp
B.podman run -d --publish-all myapp
C.podman run -d -p 8080:8080 myapp
D.podman run -d --expose 8080 myapp
AnswerC

Omitting a host IP in the -p flag causes Podman to bind the published port on all host interfaces, including the host's 192.168.1.x address. Other machines on the subnet can therefore reach the service at the host IP on port 8080. This is the correct and simplest syntax for the scenario, and it works in rootless mode because the port is above 1024.

Why this answer

To publish a container port to all host interfaces, the -p flag must be used with the host-port:container-port syntax and no host IP. Podman then binds the host port on every interface, allowing subnet clients to connect via the host's 192.168.1.x address. Using a CIDR as a host IP is invalid, --publish-all assigns random ports, and --expose does not publish anything.

Exam trap

The trap here is assuming that a subnet or CIDR can be specified as the host IP in a port mapping, when only a single IP address or no address is allowed.

139
Multi-Selecteasy

Which TWO Containerfile instructions are used to bring files or data from outside the container into the build context or image? (Choose two.)

Select 2 answers
A.COPY
B.GET
C.ADD
D.FETCH
E.IMPORT
AnswersA, C

COPY transfers files from the build context or a stage into the image filesystem, satisfying the requirement to bring external data in. ADD performs the same transfer with extra archive and URL handling. Both are distinct from RUN, which executes commands inside the build.

Why this answer

COPY is correct because it copies files or directories from the build context (or from a stage in a multi-stage build via --from) into the image filesystem, and it does not perform any remote URL fetching or automatic archive extraction. ADD is correct because it also brings files into the image, and additionally supports fetching remote URLs and auto-extracting recognized local tar archives into the destination. GET, FETCH, and IMPORT are not valid Containerfile/Dockerfile instructions, so they cannot be used to bring files or data into the build context or image.

Exam trap

EX188 often tests the confusion between COPY and ADD, and candidates may incorrectly assume GET, FETCH, or IMPORT are valid instructions because they sound like file-transfer verbs.

140
MCQmedium

After pushing an image to a registry, a developer wants to tag the local image 'myapp:v1' as 'registry.example.com/myteam/myapp:latest'. Which command accomplishes this?

A.podman rename myapp:v1 registry.example.com/myteam/myapp:latest
B.podman commit myapp:v1 registry.example.com/myteam/myapp:latest
C.podman push myapp:v1 --target registry.example.com/myteam/myapp:latest
D.podman tag myapp:v1 registry.example.com/myteam/myapp:latest
AnswerD

The tag subcommand creates a new reference pointing at the existing local image without copying layers or contacting the registry. The source stays myapp:v1 and the fully qualified target name is added, ready for a later push.

Why this answer

The podman tag command creates a new tag that points to the same image ID as an existing local image. Running podman tag myapp:v1 registry.example.com/myteam/myapp:latest adds the fully qualified registry tag to the local image, preparing it for a push to that registry.

Exam trap

EX188 often tests the misconception that podman push can retag an image on the fly, when in fact you must tag the image locally with the full registry path before pushing.

How to eliminate wrong answers

Option A is wrong because podman rename is not a valid Podman command for tagging images; there is no rename subcommand for images. Option B is wrong because podman commit creates a new image from a container's changes, not a tag on an existing image. Option C is wrong because podman push does not have a --target flag for retagging; it pushes an already-tagged image to a registry.

141
MCQeasy

An administrator needs to check the disk space consumption of all containers, images, and volumes managed by Podman. Which command should be run?

A.podman storage show
B.podman system df
C.podman disk usage
D.podman inspect --disk
AnswerB

podman system df reports disk usage for images, containers, and volumes managed by Podman, mirroring docker system df. It directly answers the administrator's need to check space consumption across all three resource types in one command.

Why this answer

`podman system df` is the correct command because it reports disk usage for Podman-managed objects — images, containers, volumes, and the build cache — in a single summary table, mirroring `docker system df`. It shows total size, reclaimable space, and active counts, making it the canonical way to audit storage consumption. The other options are not valid Podman subcommands.

Exam trap

EX188 often tests whether candidates confuse Docker-style verbs with Podman equivalents — the trap is picking a plausible-sounding but nonexistent command like `podman disk usage` instead of the real `podman system df`.

How to eliminate wrong answers

Option A is wrong because `podman storage show` is not a valid Podman subcommand; storage configuration is inspected via `podman info` or the `storage.conf` file, not a `storage show` verb. Option C is wrong because `podman disk usage` does not exist — the correct verb is `system df` (df = disk free/usage), and Podman does not expose a top-level `disk` command. Option D is wrong because `podman inspect` operates on a specific container or image object and has no `--disk` flag; it returns JSON metadata, not aggregate storage statistics.

142
MCQhard

You are designing a container image that runs an executable web server. You want to provide default arguments to the executable that can be easily overridden by a user passing arguments directly to 'podman run'. Which instruction combination is best?

A.Use ENTRYPOINT for the binary and CMD for the default arguments.
B.Use ENV for the binary and WORKDIR for the arguments.
C.Use RUN for both the binary and the arguments.
D.Use CMD for the binary and ENTRYPOINT for the default arguments.
AnswerA

ENTRYPOINT fixes the executable, while CMD supplies default arguments that a user can replace by appending values to `podman run`. This satisfies the stem's requirement for overridable defaults, since arguments passed on the command line replace CMD entirely but leave ENTRYPOINT intact.

Why this answer

Using ENTRYPOINT for the binary and CMD for the default arguments is the best practice. When a user runs 'podman run <image> <args>', the arguments passed on the command line override the CMD instruction, while the ENTRYPOINT remains the executable. This allows the user to easily override default arguments without changing the binary.

Exam trap

EX188 often tests the interaction between ENTRYPOINT and CMD, and candidates may confuse which instruction provides the executable and which provides default arguments.

How to eliminate wrong answers

Option B is wrong because ENV is used to set environment variables, not to specify the executable, and WORKDIR sets the working directory, not arguments. Option C is wrong because RUN executes commands during image build, not at container runtime, and cannot be overridden by podman run arguments. Option D is wrong because it reverses the roles: CMD for the binary would make the binary the default command, but if ENTRYPOINT is used for arguments, it would be treated as the executable, which is incorrect.

143
MCQmedium

You need to inspect the network traffic of a container by capturing packets on its virtual interface. Where can you find the host-side veth interface name associated with a running container?

A.It is always named 'eth0' on the host system.
B.In the /etc/resolv.conf file inside the container.
C.In the systemd journal logs exclusively.
D.In the container's network inspection output under network interface details.
AnswerD

Running podman network inspect or the equivalent container network inspection command lists the container's network interface details, including the host-side veth pair name. That name is then used with tcpdump on the host to capture the container's traffic.

Why this answer

The host-side veth interface name is found in the container's network inspection output, typically via 'podman inspect <container>' under the 'NetworkSettings' or 'Networks' section, which lists the interface name and its peer. This allows the admin to identify the correct veth to capture packets on.

Exam trap

The trap is assuming the host-side interface shares the container's 'eth0' name — candidates forget that veth pairs have different names on each end, and the host side is randomly generated.

How to eliminate wrong answers

Option A is wrong because the host-side veth is never 'eth0' — 'eth0' is the interface name inside the container's network namespace; on the host, the veth has a generated name like 'veth1234abc'. Option B is wrong because /etc/resolv.conf inside the container only contains DNS resolver configuration, not interface names. Option C is wrong because systemd journal logs do not exclusively or reliably contain the veth interface name — it may appear in some logs, but the authoritative source is the container's network inspection output.

144
MCQhard

An administrator needs to list all created Podman secrets on the system. Which command should they execute?

A.podman secret list
B.podman secret ls
C.podman secrets ls
D.podman system secrets
AnswerB

`podman secret ls` queries the local Podman secret store and returns every created secret, satisfying the requirement to list all secrets on the system. Unlike `podman secret inspect`, which requires a named secret, `ls` enumerates them without arguments, matching the administrator's need for a complete inventory.

Why this answer

The correct command to list all created Podman secrets is `podman secret ls`. Podman follows the same subcommand naming conventions as Docker, where `ls` is the standard alias for listing resources. The `podman secret` command group includes `create`, `inspect`, `ls`, and `rm`, so `podman secret ls` is the valid syntax to display all secrets stored in the system.

Exam trap

EX188 often tests the exact syntax of Podman subcommands, and candidates may confuse `list` with `ls` or use the plural `secrets` instead of the singular `secret`, leading to command failures.

How to eliminate wrong answers

Option A is wrong because `podman secret list` is not a valid subcommand; Podman uses `ls` (not `list`) for listing secrets, unlike some other tools that accept both. Option C is wrong because the subcommand group is `secret` (singular), not `secrets` (plural); using the plural form results in an unrecognized command error. Option D is wrong because `podman system secrets` does not exist; `podman system` manages system-level information like `df`, `info`, and `prune`, but not secrets.

145
MCQeasy

Which Containerfile instruction sets the working directory for any subsequent RUN, CMD, ENTRYPOINT, COPY, and ADD instructions?

A.PATH
B.ENV
C.WORKDIR
D.RUN
AnswerC

WORKDIR sets the working directory used by subsequent RUN, CMD, ENTRYPOINT, COPY and ADD instructions in the Containerfile, persisting across later layers. This directly satisfies the stem's requirement for the instruction that establishes that directory context.

Why this answer

The WORKDIR instruction sets the working directory for any instructions that follow it in the Containerfile.

146
MCQmedium

You want to remove a custom Podman network named 'testnet', but it currently has active containers attached to it. What happens?

A.The network is removed, and the containers lose their network interface silently.
B.The deletion fails until all connected containers are stopped and disconnected.
C.The containers are automatically disconnected and moved to the default bridge network.
D.The containers are automatically terminated and the network is removed.
AnswerB

Podman refuses to remove a network while containers remain attached, returning an error rather than silently detaching them. You must stop and disconnect every container from 'testnet' first, satisfying the stem's active-container constraint. This prevents orphaned containers losing network connectivity mid-operation.

Why this answer

Podman refuses to remove a network that has active containers attached to it; the deletion fails with an error indicating the network is in use. The administrator must first stop and disconnect all containers (or use podman network disconnect) before the network can be removed. This prevents silently breaking container connectivity and orphaned interfaces.

Exam trap

EX188 often tests whether candidates know Podman blocks network removal when containers are attached, rather than assuming automatic migration or silent removal.

How to eliminate wrong answers

Option A is wrong because Podman does not silently remove the network and strip interfaces; it blocks the operation to avoid breaking running containers. Option C is wrong because Podman does not automatically migrate containers to the default bridge; the user must explicitly disconnect or stop them. Option D is wrong because Podman does not terminate containers automatically; that would be destructive and is not the behavior of 'podman network rm'.

147
MCQmedium

An administrator needs to pass a single environment variable directly on the command line when starting a container. Which flag accomplishes this?

A.podman run -e DB_HOST=localhost myapp
B.podman run --set-env DB_HOST=localhost myapp
C.podman run -v DB_HOST=localhost myapp
D.podman run --variable DB_HOST=localhost myapp
AnswerA

The -e flag passes a single environment variable into the container at runtime, setting DB_HOST to localhost for the myapp process. This satisfies the requirement to inject one variable directly on the command line rather than through an env file.

Why this answer

The -e flag (or --env) in podman run sets an environment variable inside the container. The syntax podman run -e DB_HOST=localhost myapp passes DB_HOST=localhost to the container's environment. This is the standard and correct way to inject a single environment variable on the command line.

Exam trap

The trap is confusing flags: -v is for volumes, -e is for environment variables; candidates might also invent flags like --set-env or --variable, which do not exist.

How to eliminate wrong answers

Option B is wrong because --set-env is not a valid Podman flag; the correct flag is --env or -e. Option C is wrong because -v is used for volume mounts (e.g., -v /host:/container), not environment variables. Option D is wrong because --variable is not a valid Podman flag; it does not exist.

148
Multi-Selectmedium

Which THREE of the following are valid options or flags when working with Podman secrets? (Choose THREE)

Select 3 answers
A.podman secret extract
B.podman secret rm
C.podman secret ls
D.podman secret compile
E.podman secret create
AnswersB, C, E

`podman secret rm` deletes a stored secret from Podman's secret store, satisfying the requirement to identify valid secret-management subcommands. It mirrors the removal operation available for other Podman objects, letting you clean up secrets no longer needed by containers. This is a genuine subcommand, unlike fabricated flags.

Why this answer

Option B, `podman secret rm`, is a valid Podman subcommand used to remove one or more existing secrets from Podman's secret store, so it correctly belongs to the `podman secret` command family. Option C, `podman secret ls`, is also valid because it lists all secrets currently managed by Podman, optionally with formatting or filtering flags. Option E, `podman secret create`, is valid as the primary command for creating a new secret from a file or standard input, which is the core operation for Podman secrets.

The unmarked options do not belong: `podman secret extract` (A) is not a Podman secret subcommand, and `podman secret compile` (D) is likewise not a recognized Podman secret operation.

Exam trap

EX188 often tests whether candidates can distinguish real Podman subcommands from plausible-sounding fabrications like 'extract' or 'compile' that do not exist in the CLI.

149
Multi-Selecthard

Which TWO files or backend network management utilities are heavily relied upon by Podman for container networking stack configuration on modern Linux distributions? (Choose two.)

Select 2 answers
A.aardvark-dns
B.libnetwork
C.docker-proxy
D.iptables-nft
E.netavark
AnswersA, E

Aardvark-dns is the authoritative DNS server paired with netavark, resolving container names to IP addresses on Podman-defined networks. It supplies the name resolution layer the networking stack needs, satisfying the stem's requirement for a backend utility Podman relies upon on modern Linux distributions.

Why this answer

Option E, netavark, is correct because it is the default OCI container network backend for Podman on modern Linux distributions, responsible for setting up container network interfaces, bridges, and firewall rules. Option A, aardvark-dns, is correct because it is the authoritative DNS server that Podman relies on to provide name resolution between containers on the same network, working alongside netavark. Together, netavark and aardvark-dns replaced the older CNI-based stack as Podman's default networking solution.

Option B, libnetwork, is incorrect because it is Docker's networking library, not Podman's backend. Option C, docker-proxy, is incorrect because it is a Docker component for port forwarding, not used by Podman. Option D, iptables-nft, is incorrect because although Podman may interact with nftables through netavark, iptables-nft itself is not a Podman-specific networking utility relied upon for stack configuration.

Exam trap

EX188 often tests whether candidates confuse Docker's libnetwork/docker-proxy stack with Podman's netavark/aardvark-dns stack, or mistake a generic firewall tool like iptables-nft for a Podman-specific backend.

150
Multi-Selectmedium

An administrator wants to temporarily pause a running container's processes and later resume them. Which TWO commands should be used? (Choose TWO)

Select 2 answers
A.podman unpause
B.podman pause
C.podman freeze
D.podman resume
E.podman stop
AnswersA, B

Podman unpause resumes the cgroup freezer state previously set on the container, allowing its processes to continue from exactly where they halted. It is the second of the two commands required, completing the pause-then-resume workflow the administrator needs to restore the running container.

Why this answer

Option B, podman pause, is correct because it suspends all processes in a running container by sending SIGSTOP via the freezer cgroup, leaving the container intact so it can be resumed later. Option A, podman unpause, is correct because it reverses that state by sending SIGCONT through the freezer cgroup, allowing the previously paused processes to continue running. Together these two commands implement the temporary pause-and-resume workflow the administrator needs.

Option C, podman freeze, is not a valid Podman command for this purpose, and option D, podman resume, is likewise not a real Podman subcommand. Option E, podman stop, is incorrect because it terminates the container's processes rather than temporarily suspending them, so the container could not simply be resumed.

Exam trap

The trap is assuming symmetric command names — candidates pick 'freeze/resume' by analogy, but Podman's actual pair is 'pause/unpause'.

Page 1

Page 2 of 4

Page 3

All pages