Courseiva

Red Hat Certified Specialist in Containers (EX188, Podman-based) (EX188) (EX188) — Questions 226296

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

Page 3

Page 4 of 4

226
MCQmedium

An administrator needs to execute a package update and install dependencies during the podman build process, ensuring these commands are committed as a new layer in the final image. Which instruction accomplishes this?

A.EXEC
B.START
C.CMD
D.RUN
AnswerD

RUN executes build-time commands and commits the result to a new image layer.

Why this answer

The RUN instruction executes any commands in a current layer on top of the current image and commits the results. The resulting committed image will be used for the next step in the Containerfile.

227
MCQmedium

You want to build an image that has a build-time argument named 'VERSION'. How do you declare this variable inside the Containerfile so it can be used during the build steps?

A.DEFINE VERSION
B.ARG VERSION
C.ENV VERSION=1.0
D.VAR VERSION
AnswerB

ARG defines variables that are accessible during the build process.

Why this answer

The ARG instruction defines a variable that users can pass at build-time with podman build --build-arg <var>=<value>.

228
MCQhard

You have created a Podman pod and want to launch two containers inside this pod so they share the same network namespace. How do you specify this during container creation?

A.podman run --pod mypod -d myimage
B.podman run --share-namespace mypod -d myimage
C.podman pod connect mypod myimage
D.podman run --network pod:mypod -d myimage
AnswerA

--pod shares the network namespace of the specified pod.

Why this answer

Using '--pod <pod_name>' places the new container inside an existing pod, sharing its network, IPC, and UTS namespaces.

229
MCQmedium

When writing a Containerfile, what is the difference between shell form and exec form for the CMD instruction?

A.There is no functional difference; they are syntactic aliases.
B.Exec form runs the executable directly without invoking a shell, making it receive Unix signals (like SIGTERM) properly as PID 1.
C.Shell form is required for multi-stage builds, while exec form is for single-stage builds.
D.Shell form runs the command as PID 1, while exec form spawns a bash shell wrapper.
AnswerB

Exec form executes the binary directly as process 1, allowing proper signal handling.

Why this answer

Exec form runs the command directly without a shell, whereas shell form runs the command inside a subshell (/bin/sh -c).

230
MCQhard

An administrator is managing rootless containers and wants to enable systemd linger for their user account so that user-level container services continue running after the user logs out. Which command should be run?

A.systemctl enable --user --linger
B.podman system linger enable
C.usermod --linger=true $USER
D.loginctl enable-linger
AnswerD

loginctl enable-linger allows a user's systemd instance to run persistently even when logged out.

Why this answer

loginctl enable-linger enables systemd user services to persist after logout for rootless users.

231
Multi-Selectmedium

Which TWO scenarios correctly describe when an administrator should use the ':z' SELinux mount option instead of ':Z'? (Choose two.)

Select 2 answers
A.When disabling SELinux checks entirely for the volume.
B.When content generated on the host needs to be safely read and written by multiple container instances using a shared label.
C.When multiple containers need concurrent read-write access to the same mounted host volume.
D.When absolute isolation is required so that no other container can ever read the volume.
E.When mounting a host directory as strictly read-only.
AnswersB, C

Shared multi-container access requires the shared :z SELinux label.

Why this answer

The ':z' option is used when volume content needs to be shared read-write among multiple containers simultaneously.

232
Multi-Selecteasy

An administrator needs to manage multiple containers simultaneously using Podman. Which THREE actions can be performed directly using Podman commands? (Choose THREE)

Select 3 answers
A.Stop all running containers using 'podman stop $(podman ps -q)'.
B.Directly edit a running container's image tag using 'podman edit --tag'.
C.Instantly migrate a running container to a remote physical server using 'podman migrate'.
D.Remove all stopped containers using 'podman container prune'.
E.Restart a specific container using 'podman restart <container_name>'.
AnswersA, D, E

Combining 'podman stop' with the container IDs returned by 'podman ps -q' stops all active containers.

Why this answer

Podman allows batch operations such as stopping all containers, starting all containers, or removing all stopped containers using pruning and filtering options.

233
Multi-Selectmedium

An administrator needs to copy files between the host system and a running container. Which TWO syntax forms or commands are correct when using podman cp? (Choose TWO)

Select 2 answers
A.podman cp --target=container_name host_file.txt /app/file.txt
B.podman cp --direction=to-container host_file.txt container_name:/app/
C.podman cp container_name:/app/file.txt host_file.txt
D.podman cp host_file.txt container_name:/app/file.txt
E.podman cp --from=container_name /app/file.txt host_file.txt
AnswersC, D

This copies a file from the container to the host.

Why this answer

podman cp supports both host_path container_path and container_path host_path copy directions.

234
MCQmedium

An administrator wants to forcefully kill a running container named runaway_job immediately by sending the SIGKILL signal. Which command should be used?

A.podman kill runaway_job
B.podman terminate runaway_job
C.podman halt runaway_job
D.podman stop --force runaway_job
AnswerA

podman kill sends SIGKILL (or a specified signal) to the container's primary process immediately.

Why this answer

podman kill sends signals to containers, defaulting to SIGKILL.

235
MCQmedium

A developer needs to optimize image size by removing build caches and temporary package manager cache files within the same RUN instruction. Why must this be done in a single RUN instruction?

A.Because file deletions in separate layers do not reduce the final image size due to the layered filesystem.
B.Because package managers lock the database across different layers.
C.Because the container build engine will fail if cache cleanup happens in a separate layer.
D.To ensure environment variables persist between installation and cleanup.
AnswerA

Layers are additive; removing files in a subsequent layer just adds a whiteout file, leaving previous layers intact.

Why this answer

Docker/Podman image layers are read-only snapshots. Deleting a file in a later layer only hides it; it does not remove it from previous layers.

236
Multi-Selecteasy

Which TWO actions can be performed using the 'podman network' subcommand? (Choose two.)

Select 2 answers
A.start
B.build
C.ls
D.commit
E.rm
AnswersC, E

Lists networks.

Why this answer

'podman network' manages networks including listing (ls) and removing (rm).

237
MCQmedium

An administrator needs to inspect container health check logs to determine why recent health checks failed for a container named app_prod. Which command displays the container's health check log history?

A.podman logs --health app_prod
B.podman health-log app_prod
C.podman events --health app_prod
D.podman inspect --format='{{json .State.Health.Log}}' app_prod
AnswerD

This inspect command extracts the array of recent health check execution records including exit codes and outputs.

Why this answer

inspecting State.Health.Log within podman inspect shows recent health check execution details and error outputs.

238
MCQeasy

A user needs to log out from a private container registry to remove stored credentials from their local machine. Which command accomplishes this?

A.podman logout registry.example.com
B.podman rm auth registry.example.com
C.podman clear-credentials registry.example.com
D.podman disconnect registry.example.com
AnswerA

podman logout deletes stored authentication tokens for the specified registry.

Why this answer

'podman logout' removes stored credentials for a registry.

239
MCQmedium

A container named 'metrics' has been running for several hours, and an engineer needs to inspect its current resource consumption (CPU, memory, and network I/O usage). Which Podman command provides a live-updating stream of resource usage statistics for running containers?

A.podman inspect metrics
B.podman top metrics
C.podman system df metrics
D.podman stats metrics
AnswerD

The 'podman stats' command provides real-time CPU, memory, network, and block I/O usage statistics for containers.

Why this answer

The 'podman stats' command displays a live stream of resource usage statistics for specified containers.

240
Multi-Selectmedium

Which THREE subcommands are valid under 'podman-compose' (or 'podman compose') for managing container lifecycles and application stacks? (Choose three.)

Select 3 answers
A.compile
B.logs
C.deploy
D.up
E.down
AnswersB, D, E

Displays container log outputs.

Why this answer

'up', 'down', and 'logs' are valid compose subcommands.

241
MCQhard

You need to troubleshoot name resolution between containers on a custom network. Which backend service does Podman utilize by default for container DNS resolution in modern rootless setups?

A.nscd
B.aardvark-dns
C.dnsmasq
D.bind9
AnswerB

Aardvark-dns provides container name resolution on Podman networks.

Why this answer

Aardvark-dns is the authoritative DNS server used alongside netavark for Podman networking.

242
Multi-Selecteasy

When interacting with container registries using Podman, which THREE commands or tasks are valid operations supported natively by the Podman CLI? (Choose three.)

Select 3 answers
A.podman mount-registry --remote
B.podman compile-image --from-registry
C.podman pull registry.example.com/image:tag
D.podman push registry.example.com/image:tag
E.podman login registry.example.com
AnswersC, D, E

podman pull downloads container images from a specified registry.

Why this answer

Podman natively supports pulling, pushing, tagging, logging into, and searching container registries using standard commands matching Docker syntax.

243
Multi-Selecteasy

Which THREE storage-related items can be inspected using 'podman system df'? (Choose THREE)

Select 3 answers
A.Networks
B.Images
C.Containers
D.Volumes
E.Secrets
AnswersB, C, D

Image disk usage is reported.

Why this answer

'podman system df' reports disk usage for containers, images, and volumes.

244
Multi-Selectmedium

Which THREE statements are correct regarding the behavior and usage of the WORKDIR instruction? (Choose three.)

Select 3 answers
A.It permanently modifies the host machine's current working directory where 'podman build' was executed.
B.It can be used multiple times in a single Containerfile to change directories relative to previous WORKDIR paths or absolute paths.
C.If the directory specified does not exist, it will be created automatically, even if no instructions use it.
D.It replaces the need to specify absolute paths in COPY and ADD instructions.
E.It sets the working directory for any RUN, CMD, ENTRYPOINT, COPY, and ADD instructions that follow it.
AnswersB, C, E

Multiple WORKDIR instructions can be used sequentially.

Why this answer

WORKDIR sets the path, creates the directory if missing, and affects subsequent instructions.

245
Multi-Selecthard

Which THREE practices are recommended when optimizing cache utilization during image builds with podman build?

Select 3 answers
A.Use the --no-cache flag on every routine build to ensure absolute freshness.
B.Always place COPY . . at the very top of the Containerfile before installing software dependencies.
C.Place instructions that change frequently, such as COPYing source code, near the end of the Containerfile.
D.Combine related package installation and cleanup steps into a single RUN instruction.
E.Order Containerfile instructions from least frequently changed to most frequently changed.
AnswersC, D, E

Delaying frequent changes prevents invalidating the cache for upstream setup layers.

Why this answer

To maximize cache efficiency, place instructions that change frequently (like copying source code) lower down in the Containerfile, group related installation steps into single RUN commands, and order instructions from least frequently changed to most frequently changed.

246
MCQhard

An administrator needs to set up a local directory to act as an OCI-compliant layout image store, and then push an image into it using Podman. Which transport prefix is used for local OCI layout directories?

A.tar:directory_path:tag
B.dir:directory_path:tag
C.local:directory_path:tag
D.oci:directory_path:tag
AnswerD

The oci: transport specifies an OCI-compliant image layout directory.

Why this answer

The 'oci:' transport prefix is used for local OCI layout directories.

247
MCQeasy

A user running rootless Podman wants to check the disk space consumed by images and containers in local storage. Which command provides this storage usage summary?

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

podman system df displays storage consumption statistics for containers, images, and volumes.

Why this answer

'podman system df' reports disk space usage for Podman storage.

248
MCQmedium

An administrator needs to create a Podman secret from a file on disk named 'secret.txt'. Which command correctly performs this action?

A.podman secret import db_secret secret.txt
B.podman create secret db_secret secret.txt
C.podman secret add db_secret --file secret.txt
D.podman secret create db_secret secret.txt
AnswerD

This syntax creates a secret named 'db_secret' populated from 'secret.txt'.

Why this answer

'podman secret create' takes a secret name and a file path containing the secret data.

249
MCQhard

An administrator wants to ensure that a bind-mounted directory allows propagation of mounts from the host into the container. Which mount option configures mount propagation mode?

A.podman run -v /host/dir:/container/dir:mtype=shared myapp
B.podman run -v /host/dir:/container/dir:shared myapp
C.podman run -v /host/dir:/container/dir:sync myapp
D.podman run -v /host/dir:/container/dir:propagate myapp
AnswerB

The ':shared' suffix configures mount propagation.

Why this answer

Mount propagation (shared, slave, private) can be configured using propagation options like 'shared' or 'slave'.

250
MCQeasy

An administrator needs to create a persistent storage area managed completely by Podman that does not rely on a specific host directory path. Which command should be used?

A.podman volume bind my_data
B.podman run -v /my_data
C.podman volume create my_data
D.podman create volume my_data
AnswerC

This command creates a managed named volume that Podman controls.

Why this answer

Podman named volumes are managed by the container engine and stored in a host directory managed by Podman, unlike bind mounts which bind to a specific user-defined host path.

251
MCQmedium

A developer wants to search for all available container images matching the term 'rhel9' across configured registries using Podman. Which command should they run?

A.podman find rhel9
B.podman query rhel9
C.podman search rhel9
D.podman lookup rhel9
AnswerC

podman search queries the container registries defined in registries.conf for matching image names.

Why this answer

'podman search' queries configured registries for matching images.

252
Multi-Selectmedium

Which TWO conditions are required for a non-root (rootless) user to successfully bind mount a host directory into a container? (Choose TWO)

Select 2 answers
A.Direct modification of the host kernel mount tables
B.The user must have read/write access to the host directory on the host file system
C.Disabling user namespaces across the system
D.Root privileges on the host operating system
E.Proper SELinux labeling (such as :z or :Z) if SELinux is enforcing
AnswersB, E

Host filesystem permissions apply to rootless users.

Why this answer

Rootless users must have read/write permissions to the host path on the host filesystem and proper permissions/SELinux context.

253
MCQeasy

An administrator needs to push a locally built Podman image named 'app:latest' to a remote container registry at 'registry.example.com/team'. Which command must be executed first to authenticate with the registry before pushing?

A.podman push --auth registry.example.com
B.podman auth registry.example.com
C.podman login registry.example.com
D.podman connect registry.example.com
AnswerC

podman login authenticates against the specified container registry.

Why this answer

Before pushing an image to a registry, you must authenticate using 'podman login'.

254
Multi-Selecteasy

An administrator needs to stop and remove a running container in a single workflow. Which TWO of the following approaches accomplish this? (Choose TWO)

Select 2 answers
A.podman kill --remove container_name
B.podman rm -f container_name
C.podman delete --force container_name
D.podman stop --rm container_name
E.podman stop container_name followed by podman rm container_name
AnswersB, E

The -f flag forces removal of a running container by stopping it and removing it immediately.

Why this answer

podman rm -f forces removal of running containers (stopping them first), and stopping a container before running podman rm is also valid.

255
MCQmedium

In a Podman Compose file, how do you define a custom network and connect a service to it?

A.Use the 'links:' directive inside the service block exclusively.
B.Add a 'network_mode' string directly pointing to an external shell script.
C.Define networks at the root level and reference them under each service configuration.
D.Configure networking exclusively via command-line environment variables.
AnswerC

This is the standard Docker/Podman Compose networking specification.

Why this answer

Compose files require a top-level 'networks:' section and service-level 'networks:' declarations.

256
MCQmedium

You need to ensure that a file copied into your image via the COPY instruction is owned by a specific user 'developer' and group 'devgroup'. How can this be achieved efficiently?

A.COPY app.py /app/app.py && chown developer:devgroup /app/app.py
B.COPY --chown=developer:devgroup app.py /app/app.py
C.COPY --user=developer:devgroup app.py /app/app.py
D.ADD --owner=developer app.py /app/app.py
AnswerB

--chown sets the user and group ownership directly during the COPY step.

Why this answer

The COPY instruction supports the --chown flag to set ownership during the copy operation.

257
MCQmedium

A security team requires that all container processes run with a specific SELinux type instead of the default container_t. How can an administrator specify a custom SELinux type when launching a container with 'podman run'?

A.--security-opt label=type:custom_t
B.--selinux-type custom_t
C.--cap-add SELINUX
D.--env SELINUX_TYPE=custom_t
AnswerA

--security-opt label=type:... overrides the default SELinux type for the container process.

Why this answer

The '--security-opt' flag can be used to set custom SELinux labels (e.g., label=type:custom_t).

258
MCQeasy

How can an administrator remove all unused, dangling Podman volumes that are not currently attached to any container?

A.podman rm --volumes
B.podman volume rm --all
C.podman volume clean
D.podman volume prune
AnswerD

Prune specifically deletes unused and dangling volumes.

Why this answer

'podman volume prune' removes all volumes that are not actively used by any container.

259
MCQhard

An administrator needs to configure a custom search domain for short-name image pulls across all users on a RHEL 9 system. Which configuration file must be edited?

A./etc/containers/storage.conf
B./etc/containers/policy.json
C./etc/containers/registries.conf
D./etc/containers/registries.d/
AnswerC

Global registry settings like unqualified-search-registries are configured in /etc/containers/registries.conf.

Why this answer

System-wide registry configurations, including unqualified-search-registries, are defined in /etc/containers/registries.conf.

260
Multi-Selectmedium

Which TWO actions are required when configuring a secure container workflow to push a signed image to a registry using Podman? (Choose two.)

Select 2 answers
A.Disable SELinux enforcement globally on the container host before generating signatures.
B.Store the private signing key inside the container image payload.
C.Set the container storage driver to vfs in storage.conf.
D.Generate a cryptographic key pair and ensure the private key is available to sign the image.
E.Configure /etc/containers/registries.d/ to specify where signature transport and storage are located.
AnswersD, E

A private key is strictly required to cryptographically sign container images.

Why this answer

Pushing a signed image requires generating a local key pair (e.g., using GPG), configuring the signature storage destination in registries.d, and signing the image during or after the push process using podman push or podman image sign.

261
Multi-Selecteasy

Which TWO commands are used to manage Podman secrets? (Choose TWO)

Select 2 answers
A.podman secret create
B.podman secret compile
C.podman secret update
D.podman secret ls
E.podman secret modify
AnswersA, D

Creates a secret.

Why this answer

'podman secret create' and 'podman secret ls' are valid secret management commands.

262
Multi-Selectmedium

When publishing container ports using the Podman CLI, which THREE methods or syntaxes are valid for the -p / --publish flag? (Choose three)

Select 3 answers
A.-p 8080:80
B.-p 127.0.0.1:8080:80
C.-p container=80,host=8080
D.-p 80:8080:tcp:bind
E.-p 8080:80/udp
AnswersA, B, E

Correct. Standard host_port:container_port mapping.

Why this answer

Valid port publishing syntaxes include mapping host port to container port, specifying protocol (UDP/TCP), and binding to a specific host IP.

263
MCQmedium

An administrator wants to prevent users from pulling images from any registry except 'registry.access.redhat.com'. Where should this restriction be configured?

A./etc/containers/policy.json under 'default' block rules
B./etc/containers/registries.conf under 'unqualified-search-registries' and blocked registries lists
C./etc/containers/storage.conf under 'block-pull'
D.~/.config/containers/access.conf
AnswerB

Registries can be blocked or restricted via registries.conf directives.

Why this answer

Registry blocking is configured in /etc/containers/registries.conf using the unqualified-search-registries or blocked registries directives.

264
MCQhard

When creating multi-architecture container images using podman build, how can you ensure that architecture-specific binaries are correctly handled when using instructions like COPY?

A.By setting the ARCH environment variable in the base image.
B.By manually editing the Containerfile to include architecture-specific IF/ELSE statements.
C.By running podman build separately for each architecture and combining them with podman manifest.
D.By utilizing automatic build arguments such as TARGETOS and TARGETARCH provided in multi-arch build stages.
AnswerC, D

Using podman manifest is the standard way to combine single-arch images into a multi-arch list.

Why this answer

Podman supports building for multiple architectures using buildah/podman features, where TARGETPLATFORM, TARGETOS, and TARGETARCH build args are automatically available.

265
Multi-Selecteasy

Which TWO commands are used to transfer container images via archive files without interacting with a network registry? (Choose two.)

Select 2 answers
A.podman save
B.podman import
C.podman export
D.podman load
E.podman transfer
AnswersA, D

podman save exports images to a tar archive.

Why this answer

'podman save' exports images to tar archives and 'podman load' imports them.

266
MCQmedium

A system administrator needs to load a container image from a previously generated tar archive named 'app.tar' into local Podman storage. Which command should be executed?

A.podman import app.tar
B.podman restore -i app.tar
C.podman load -i app.tar
D.podman read app.tar
AnswerC

podman load reads an image archive created by podman save.

Why this answer

'podman load' imports an image from a tar archive.

267
MCQeasy

A user needs to remove a local container image that is no longer needed. Which command should be used?

A.podman image delete image_name
B.podman rm image_name
C.podman delete image_name
D.podman rmi image_name
AnswerD

podman rmi removes specified local images.

Why this answer

'podman rmi' removes one or more local images.

268
MCQhard

An administrator configures a mirror for a primary registry in /etc/containers/registries.conf. What is the correct TOML syntax format to define a registry block with a mirror?

A.registry: name: registry.example.com mirror: internal-mirror.example.com
B.[[registry]] prefix = "registry.example.com" location = "internal-mirror.example.com"
C.SERVER=registry.example.com MIRROR=internal-mirror.example.com
D.[registry "registry.example.com"] mirror = "internal-mirror.example.com"
AnswerB

The [[registry]] array of tables format with location and mirrors is correct for registries.conf.

Why this answer

TOML syntax in registries.conf uses [[registry]] tables and registries.search or registries.block fields alongside mirrors.

269
Multi-Selectmedium

Which THREE methods or directives can be used to pass environment variables into containers via Podman Compose? (Choose three.)

Select 3 answers
A.sysctl_env
B.env_file
C.container_env
D.Shell variable interpolation (e.g., ${VAR})
E.environment
AnswersB, D, E

Loads environment variables from external files.

Why this answer

Environment variables can be passed using 'environment', 'env_file', and shell interpolation.

270
MCQmedium

A developer has written a Containerfile with multiple COPY instructions for static configuration files that change frequently, placed near the top of the Containerfile before the application code installation. Why is this considered a bad practice for build caching?

A.It invalidates the build cache for all subsequent instructions whenever those configuration files change, slowing down builds.
B.It violates OCI container image specification limits on COPY counts.
C.It causes the ENTRYPOINT instruction to fail at runtime.
D.It causes Podman to store duplicate layers in local storage, exhausting disk space.
AnswerA

Layer caching depends on the order of instructions and changes to files being copied.

Why this answer

Changing a file earlier in the Containerfile invalidates the cache for all subsequent instructions, forcing unnecessary rebuilds of heavy steps.

271
MCQeasy

Which flag is used with 'podman run' to create an ephemeral, writable container layer scratchpad that is automatically destroyed when the container stops?

A.podman run (no special volume flags)
B.podman run --rm-storage
C.podman run --volatile
D.podman run --ephemeral
AnswerA

Default container storage is temporary and discarded upon removal unless committed or mounted.

Why this answer

Standard containers created with 'podman run' are ephemeral by default unless volumes or mounts are attached.

272
MCQhard

An administrator runs a container with a SELinux-relabeled host directory mount using the Z option, but multiple containers need to share write access to this exact same volume. Which option should be used instead?

A.podman run -v /host/data:/data:O
B.podman run -v /host/data:/data:Z
C.podman run -v /host/data:/data:z
D.podman run -v /host/data:/data:shared
AnswerC

Lowercase z relabels content so multiple containers can share the volume.

Why this answer

The z option (lowercase z) shares SELinux content among multiple containers, whereas Z (uppercase Z) treats the content as private and unshared.

273
MCQhard

You have a Kubernetes YAML manifest file named 'app.yaml' that defines a Pod with network settings. You want to deploy this directly as a Podman container/pod on your local system. Which command should you use?

A.podman-compose up --file app.yaml
B.podman run --kube app.yaml
C.podman apply -f app.yaml
D.podman play kube app.yaml
AnswerD

Correct. 'podman play kube' deploys workloads defined in a Kubernetes YAML file.

Why this answer

The 'podman play kube' command reads a Kubernetes YAML file and deploys the defined pods and containers locally.

274
Multi-Selectmedium

Which TWO parameters or directives can be configured inside '/etc/containers/registries.conf' to control how Podman interacts with container registries? (Choose two.)

Select 2 answers
A.default_transport
B.storage_driver
C.signature_policy_file
D.[[registry]] for defining prefix matching, mirrors, and insecure registries.
E.unqualified-search-registries
AnswersD, E

The TOML table [[registry]] configures specific registry behavior including transport and mirrors.

Why this answer

registries.conf handles unqualified search registries and registry blocking/mirroring.

275
Multi-Selectmedium

Which THREE configuration keys are valid within a service definition block in a Podman Compose file for managing container networking and ports? (Choose three.)

Select 3 answers
A.ports
B.interfaces
C.expose
D.firewall
E.networks
AnswersA, C, E

Valid key for port publishing.

Why this answer

'ports', 'expose', and 'networks' are valid compose keys.

276
MCQeasy

Which Podman network mode completely isolates a container from any network communication, removing all interfaces except the loopback?

A.--network none
B.--network isolated
C.--network closed
D.--network disabled
AnswerA

--network none isolates the container completely.

Why this answer

The 'none' network driver disables all external and internal networking for the container.

277
MCQmedium

An administrator needs to copy a directory named /app/logs from a running container named prod_app to the local host directory /var/backups/. Which command accomplishes this?

A.podman export --path /app/logs prod_app /var/backups/
B.podman pull prod_app:/app/logs /var/backups/
C.podman download prod_app:/app/logs /var/backups/
D.podman cp prod_app:/app/logs /var/backups/
AnswerD

podman cp prod_app:/app/logs /var/backups/ correctly extracts the directory from the container to the host.

Why this answer

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

278
MCQmedium

A user running rootless Podman wants to pull an image from an insecure registry running over HTTP on port 5000. When running 'podman pull', the command fails with a connection error. Where must the administrator define this registry as insecure for the user?

A.~/.local/share/containers/storage.conf
B./etc/sysconfig/podman
C./etc/containers/registries.conf
D.~/.config/containers/registries.conf
AnswerD

Rootless Podman looks for user-specific registry configurations in ~/.config/containers/registries.conf.

Why this answer

For rootless users, insecure registries are configured in ~/.config/containers/registries.conf.

279
Multi-Selectmedium

Which TWO statements are true regarding user-defined bridge networks in Podman? (Choose two)

Select 2 answers
A.They require the host firewall to be completely disabled to function.
B.Containers attached to different user-defined networks can communicate without explicit routing.
C.They prevent containers from communicating with the outside internet entirely.
D.They allow administrators to specify custom subnets and gateways during creation.
E.They provide automatic internal DNS resolution so containers can reach each other by name.
AnswersD, E

Correct. The --subnet and --gateway flags can be specified when creating custom networks.

Why this answer

User-defined bridge networks provide automatic container name resolution via internal DNS and allow defining custom subnets.

280
MCQhard

You need to copy local application source code from your build context into the /app directory inside the container image, automatically unpacking it if it is a local tar archive. Which instruction should you select?

A.FETCH
B.TRANSFER
C.COPY
D.ADD
AnswerD

ADD supports copying files and automatically unpacking local tar archives.

Why this answer

The ADD instruction copies new files, directories, or remote file URLs from <src> and adds them to the filesystem of the container at the path <dest>. A key feature distinguishing ADD from COPY is its ability to automatically extract local tar archives.

281
MCQeasy

An administrator needs to list all containers, including both running and stopped ones, on the system. Which command should be used?

A.podman ps -a
B.podman status --all
C.podman list --all
D.podman containers show
AnswerA

podman ps -a lists all containers regardless of their current state.

Why this answer

podman ps lists containers, and the -a or --all flag includes stopped containers.

282
MCQeasy

A container named db_cache has stopped unexpectedly. An administrator wants to see the standard output logs generated by this container prior to its exit. Which command should be used?

A.podman inspect --logs db_cache
B.podman logs db_cache
C.podman output db_cache
D.podman history db_cache
AnswerB

podman logs fetches the logged output from the container.

Why this answer

podman logs displays the logs of a container, including stopped ones, provided the logging driver captured them.

283
Multi-Selecthard

An administrator is integrating Podman containers with systemd using generated unit files. Which TWO statements are correct regarding podman generate systemd and its usage? (Choose TWO)

Select 2 answers
A.Running systemctl daemon-reload is unnecessary after generating a unit file because Podman reloads systemd automatically.
B.Generated systemd files for rootless users must always be placed in /etc/systemd/system/.
C.The --new flag ensures that the generated service creates a new container instance upon starting rather than requiring a pre-existing static container.
D.podman generate systemd can output unit files for both individual containers and pods.
E.Generated systemd unit files are executed exclusively by Docker daemon integration.
AnswersC, D

--new instructs the generated systemd unit to run podman run instead of podman start.

Why this answer

podman generate systemd creates systemd unit files, and the --new flag ensures unit files create fresh containers on startup rather than relying on existing static container names.

284
Multi-Selecteasy

Which TWO methods can a user employ to verify that an image has been successfully downloaded to their local machine? (Choose two.)

Select 2 answers
A.Running 'podman network ls' to verify image network attachment.
B.Running 'podman image inspect <image_name>' to view its configuration metadata.
C.Running 'podman ps -a' to see the downloaded image layers.
D.Running 'podman volume inspect' to check image storage paths.
E.Running 'podman images' to check if the image name and tag appear in the list.
AnswersB, E

podman image inspect displays detailed metadata for a local image.

Why this answer

Images can be verified using 'podman images' or 'podman image inspect'.

285
MCQeasy

A user wants to remove all unused container images that are not currently associated with an existing container from local storage. Which command should they execute?

A.podman container prune
B.podman rmi --all
C.podman image prune -a
D.podman system clean
AnswerC

podman image prune with -a removes all images not used by a container, not just dangling ones.

Why this answer

'podman image prune' removes unused images.

286
Multi-Selecteasy

Which TWO options are valid flags for the 'podman build' command to specify build arguments and tags? (Choose two.)

Select 2 answers
A.--volume
B.--publish
C.--build-arg
D.-t / --tag
E.--env-file
AnswersC, D

--build-arg passes build-time variables into the Containerfile.

Why this answer

--build-arg and --tag (-t) are standard options for podman build.

287
MCQmedium

An auditor reviewing your Containerfile notices an EXPOSE instruction for port 80. What is the primary function of the EXPOSE instruction?

A.It documents which ports the container listens on at runtime.
B.It opens firewall ports on the underlying RHEL host system permanently.
C.It encrypts network traffic entering the specified container port.
D.It automatically publishes all exposed ports to random host ports without flags.
AnswerA

EXPOSE acts as metadata/documentation indicating intended network ports.

Why this answer

The EXPOSE instruction informs Podman that the container listens on the specified network ports at runtime. It functions as a type of documentation between the person who builds the image and the person who runs the container, though ports can still be published manually via flags.

288
MCQhard

When deploying containers using Podman Compose, what is the default network driver assigned to user-defined networks created by compose if no driver is specified?

A.host
B.macvlan
C.overlay
D.bridge
AnswerD

Bridge is the default network driver.

Why this answer

The default bridge driver is used for user-defined compose networks unless specified otherwise.

289
Multi-Selecteasy

Which TWO commands display information about container images present in local Podman storage? (Choose two.)

Select 2 answers
A.podman container list
B.podman ps
C.podman volume ls
D.podman image inspect
E.podman images
AnswersD, E

podman image inspect shows detailed metadata for an image.

Why this answer

'podman images' and 'podman image inspect' display local image information.

290
MCQeasy

A user wants to inspect the metadata and layers of an image stored locally without running it. Which Podman command should be used?

A.podman inspect image_name
B.podman view image_name
C.podman info
D.podman show image_name
AnswerA

podman inspect outputs low-level information on Podman objects in JSON format.

Why this answer

'podman inspect' provides detailed configuration and metadata for an image or container.

291
MCQhard

An administrator wants to find out which host port is mapped to port 80/tcp inside a running container named proxy_svr, using format templating with podman inspect. Which command accomplishes this?

A.podman ports proxy_svr
B.podman inspect --ports proxy_svr
C.podman ps --filter port=80
D.podman inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' proxy_svr
AnswerD

This template iterates over the port bindings and displays the mapping between container and host ports.

Why this answer

Port bindings are stored within NetworkSettings.Ports in the inspect JSON structure.

292
MCQhard

An administrator is troubleshooting a container that fails its health check repeatedly. The container definition needs a health check that runs curl -f http://localhost/ || exit 1 every 30s, with a 5s timeout and 3 retries, starting after a 10s grace period. Which flag combination implements this correctly in podman run?

A.podman run --healthcheck="curl -f http://localhost/" --interval=30 --timeout=5 --retries=3 webapp
B.podman run --health-probe="curl -f http://localhost/" --health-delay=10s webapp
C.podman run --health-cmd="curl -f http://localhost/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 --health-start-period=10s webapp
D.podman run --check-command="curl -f http://localhost/" --check-period=30s webapp
AnswerC

These are the correct exact flags for configuring container health checks in Podman.

Why this answer

The --health-cmd, --health-interval, --health-timeout, --health-retries, and --health-start-period options configure container health checks.

293
MCQhard

A developer wants to pass a secret API key during the container build process without leaving the secret exposed in image layers or history. Which Podman feature should be used?

A.ARG API_KEY=secret_value
B.ENV API_KEY=secret_value
C.podman build --secret id=mysecret,src=/path/to/key.txt . with RUN --mount=type=secret,id=mysecret ...
D.ADD /path/to/key.txt /app/key.txt followed by RUN rm /app/key.txt
AnswerC

The --secret build flag combined with RUN --mount=type=secret allows secure, non-persistent access to secrets during build.

Why this answer

Podman supports build-time secrets using the --secret flag and the --mount=type=secret directive in the Containerfile.

294
MCQeasy

An administrator wants to generate a systemd unit file for an existing container named web_frontend so it can be managed by systemd. Which command should be run?

A.systemctl enable --container web_frontend
B.podman generate systemd --new --name web_frontend
C.podman export systemd web_frontend
D.podman systemd generate --name web_frontend
AnswerB

podman generate systemd creates systemd service files, and --new specifies that unit files should create new containers rather than relying on existing ones.

Why this answer

podman generate systemd creates a systemd unit file for a container or pod.

295
Multi-Selecteasy

An administrator needs to view logs or attach to a running container to troubleshoot an issue. Which TWO commands can be used to interact with container output streams? (Choose TWO)

Select 2 answers
A.podman stream
B.podman view-logs
C.podman attach
D.podman output
E.podman logs
AnswersC, E

podman attach connects local terminal streams to the running container.

Why this answer

podman logs retrieves logged output, and podman attach connects to container input/output streams.

296
MCQmedium

You need to configure a container so that its port 8080 maps to port 80 on the host's loopback interface only (127.0.0.1). Which syntax is correct?

A.podman run --net 127.0.0.1:80:8080 myapp
B.podman run -p 80:8080/127.0.0.1 myapp
C.podman run --publish 8080:80/lo myapp
D.podman run -p 127.0.0.1:80:8080 myapp
AnswerD

Binds port 8080 in the container to port 80 on 127.0.0.1.

Why this answer

Specifying the IP address in the port mapping string restricts binding to that specific interface, preventing external network access to the forwarded port.

Page 3

Page 4 of 4

All pages