Courseiva

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

301 questions total · 5pages · All types, answers revealed

Page 1 of 5

Page 2
1
Multi-Selecteasy

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

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

Inspects volume details.

Why this answer

'podman volume create', 'podman volume inspect', and 'podman volume rm' are valid volume commands.

2
Multi-Selecthard

Which THREE parameters are valid key-value pairs when using the advanced '--mount' flag with bind or volume types? (Choose THREE)

Select 4 answers
A.source
B.type
C.format
D.destination
E.owner
AnswersA, B, D, E

Specifies the source path or volume name.

Why this answer

When using '--mount', valid keys include type, source (or src), and destination (or target/dst).

3
MCQmedium

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

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

Using && ensures commands run sequentially in the same layer.

Why this answer

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

4
MCQmedium

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

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

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

Why this answer

podman cp copies files/folders between a container and the local filesystem.

5
Multi-Selecthard

Which THREE configuration directives or files are associated with customizing container storage backends and root directory locations in Podman? (Choose three.)

Select 3 answers
A.The environment variables 'CONTAINERS_STORAGE_DRIVER' or 'STORAGE_DRIVER'.
B.The signature verification policy file '/etc/containers/policy.json'.
C.The registry authentication file '~/.config/containers/auth.json'.
D.The user-specific configuration file '~/.config/containers/storage.conf'.
E.The system-wide configuration file '/etc/containers/storage.conf'.
AnswersA, D, E

Environment variables can override default storage driver settings.

Why this answer

Storage options are configured in /etc/containers/storage.conf, via environment variables like STORAGE_DRIVER, or via user home directory overrides.

6
MCQeasy

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

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

Disconnects the container from the network.

Why this answer

'podman network disconnect' removes a container from a specified network.

7
Multi-Selectmedium

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

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

podman logs fetches standard output and error logs generated by the container.

Why this answer

podman logs retrieves container stdout/stderr, and podman events streams system-wide container events.

8
MCQeasy

A container administrator needs to download an image named rhel9/httpd-24 from the Red Hat Ecosystem Catalog using Podman, but requires local authorization without interactive password prompts. Which file should the administrator configure to store these registry credentials in base64-encoded format?

A.~/.local/share/containers/storage/mounts
B.~/.config/containers/auth.json
C./etc/containers/registries.conf
D./etc/sysconfig/podman
AnswerB

This file stores registry credentials for Podman authentication.

Why this answer

Podman uses the standard Docker-compatible auth configuration file located at $XDG_RUNTIME_DIR/containers/auth.json or ~/.config/containers/auth.json to store base64-encoded credentials for registry authentication.

9
Multi-Selecthard

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

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

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

Why this answer

podman top shows container processes, and podman update modifies container resources live.

10
Multi-Selecteasy

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

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

podman image build is an alias/subcommand syntax for building images.

Why this answer

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

11
MCQeasy

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

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

ENV defines persistent environment variables in the image.

Why this answer

The ENV instruction sets environment variables that persist when the container runs.

12
MCQmedium

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

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

The 'podman events' command listens to and prints real-time streaming events occurring within the Podman environment.

Why this answer

The 'podman events' command streams real-time events from the Podman system.

13
MCQeasy

Which subcommand deletes one or more specific named volumes?

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

'rm' is the subcommand for removing volumes.

Why this answer

'podman volume rm' removes specified named volumes.

14
MCQeasy

A container needs read-only access to a host configuration directory located at /etc/appconfig. Which Podman volume flag configuration correctly achieves this?

A.--volume /etc/appconfig:/app/config:readonly=true
B.--mount type=bind,src=/etc/appconfig,dst=/app/config,mode=ro
C.--volume /etc/appconfig:/app/config:readonly
D.--volume /etc/appconfig:/app/config:ro
AnswerD

Correct. The :ro suffix applies read-only permissions.

Why this answer

Appending :ro to a volume mount specifier ensures the mount is read-only inside the container.

15
MCQeasy

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

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

Rootless containers rely on user namespaces and subordinate UID/GID ranges configured in /etc/subuid and /etc/subgid.

Why this answer

Rootless Podman utilizes user namespaces (user_namespaces(7)) to map the unprivileged user to a set of UIDs and GIDs inside the container environment, combined with shadow-utils mapping files.

16
MCQhard

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

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

This command shows detailed JSON configuration for the network.

Why this answer

'podman network inspect' displays detailed low-level network configurations in JSON format.

17
MCQmedium

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

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

This correctly installs the CA certificate and updates the system trust store on Red Hat-based images.

Why this answer

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

18
Multi-Selecthard

Which THREE formatting options or commands can be used with 'podman volume ls' to customize or filter output? (Choose THREE)

Select 3 answers
A.--filter
B.--format
C.--sort
D.--no-trunc
E.--json-pretty
AnswersA, B, D

Filters output based on conditions (e.g., driver, name).

Why this answer

'podman volume ls' supports flags such as --filter, --format, and --no-trunc.

19
MCQhard

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

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

Correct. The secret is created and then mounted using the appropriate options.

Why this answer

Secrets must first be created via 'podman secret create' and then injected using the '--secret' flag during container creation.

20
MCQhard

A container using a named volume needs to be deleted, but you want to ensure the persistent volume data is preserved for future containers. Which command should you execute?

A.podman rm -v my_container
B.podman rm --volumes my_container
C.podman rm my_container
D.podman volume prune --associated my_container
AnswerC

Correct. Running podman rm without volume removal flags leaves named volumes intact.

Why this answer

The standard podman rm command deletes the container, but volume data persists unless the -v or --rm --volumes flags are specified.

21
Multi-Selectmedium

Which THREE mechanisms are valid ways to pass build arguments into a Containerfile during a 'podman build' invocation? (Choose three.)

Select 3 answers
A.Using the '--build-arg-file' flag to read variables from a file.
B.Placing default values directly in the Containerfile using 'ARG KEY=DEFAULT_VALUE'.
C.Using the '--env-file' flag during 'podman build' to populate ARG variables.
D.Using the '--build-arg KEY=VALUE' flag on the command line.
E.Using multiple '--build-arg KEY' flags without values, which automatically inherits the value from the host environment.
AnswersB, D, E

ARG instructions can define default values that apply if no build-arg is passed.

Why this answer

Build arguments can be passed via command line flags or environment files during build.

22
MCQhard

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

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

'FROM scratch' contains no libraries or shell; dynamically linked binaries fail unless all dependencies are also copied.

Why this answer

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

23
MCQmedium

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

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

Correct. Podman mounts secrets in /run/secrets/ by default.

Why this answer

Podman secrets are mounted into the container under /run/secrets/ by default if an explicit target is not provided.

24
MCQmedium

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

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

This is the core purpose of multi-stage builds.

Why this answer

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

25
MCQmedium

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

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

--uidmap and --gidmap explicitly define how container UIDs/GIDs map to host UIDs/GIDs.

Why this answer

UID/GID mappings are configured using --uidmap and --gidmap.

26
MCQhard

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

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

type=env configures the secret to be loaded as an environment variable.

Why this answer

Using the 'type=env' option with '--secret' injects the secret value directly into an environment variable.

27
Multi-Selectmedium

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

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

Lingering is mandatory for rootless containers managed by user systemd to start at boot without an active user session.

Why this answer

Rootless Podman persistence via systemd requires lingering to be enabled for the user so systemd runs when they are logged out, and generating/enabling a systemd service file.

28
Multi-Selecteasy

Which TWO commands or flags can be used to publish a container port to the host in Podman? (Choose two.)

Select 3 answers
A.-p
B.--publish
C.-P
D.--port
E.--expose
AnswersA, B, C

Short flag for publishing ports.

Why this answer

Both -p and --publish are valid flags for publishing ports in Podman.

29
MCQmedium

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

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

This is the correct key-value syntax for the --mount flag.

Why this answer

The '--mount' flag uses comma-separated key-value pairs like type=bind,source=...,destination=...

30
MCQhard

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

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

The unqualified-search-registries setting allows Podman to prefix short image names with specified registry domains.

Why this answer

Unqualified search registries are configured in /etc/containers/registries.conf using the unqualified-search-registries array parameter.

31
MCQmedium

An administrator runs a container with an SELinux-enforced host bind mount, but the container processes fail to write to the directory due to permission errors. Which volume option resolves this by sharing the SELinux content label?

A.--volume /host/data:/container/data:rprivate
B.--volume /host/data:/container/data:shared
C.--volume /host/data:/container/data:z
D.--volume /host/data:/container/data:private
AnswerC

Correct. The :z option shares the SELinux label among multiple containers.

Why this answer

The :Z option instructs Podman to relabel the host path specifically for the container, while :z shares it across multiple containers.

32
MCQhard

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

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

Correct. This command connects an active container to a specified network.

Why this answer

The 'podman network connect' command attaches a running container to an additional network interface.

33
Multi-Selectmedium

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

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

COPY is the standard instruction for copying local files into the container.

Why this answer

Both COPY and ADD can be used to copy files and directories from the build context into the container image filesystem.

34
MCQeasy

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

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

This places the container on the host network stack.

Why this answer

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

35
MCQmedium

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

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

podman unpause resumes the execution of processes in a paused container.

Why this answer

podman unpause unfreezes the processes within the paused container.

36
MCQhard

When inspecting the networking of a container using 'podman inspect', where is the IP address of the container located in the output JSON structure?

A.NetworkSettings.IPAddress
B.HostConfig.PortBindings.IP
C.Config.Network.IP
D.State.Networking.Address
AnswerA

Contains the primary IP address in the container inspection output.

Why this answer

The NetworkSettings.IPAddress field contains the IPv4 address assigned to the container on its default network.

37
Multi-Selectmedium

Which TWO settings or files are critical when configuring rootless Podman environments on RHEL 9? (Choose two.)

Select 2 answers
A./etc/selinux/config for enforcing SELinux mode.
B./etc/sudoers for root privileges.
C./etc/subuid and /etc/subgid for user namespace allocations.
D./etc/shadow for root password hashes.
E.~/.config/containers/registries.conf for user-specific registry configurations.
AnswersC, E

Subordinate UID/GID ranges are mandatory for rootless namespace mapping.

Why this answer

Rootless Podman relies on subordinate UIDs/GIDs in /etc/subuid and /etc/subgid, and user configurations in ~/.config/containers/.

38
MCQhard

An organization enforces that all container images must be signed using a local GPG key before they can be deployed in production. Which command generates a signature for an image stored in local storage using a specific signing key?

A.podman push --sign-by <key_id> app:latest
B.podman image sign --sign-by <key_id> registry.example.com/app:latest
C.podman gpg --sign app:latest
D.podman sign --key <key_id> app:latest
AnswerB

podman image sign signs the specified image using the given key ID.

Why this answer

'podman image sign' is used to sign images for verification policies.

39
MCQmedium

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

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

This kernel parameter determines the lowest port number that can be bound by non-root users.

Why this answer

The sysctl parameter net.ipv4.ip_unprivileged_port_start controls the lowest port unprivileged users can bind to.

40
Multi-Selecthard

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

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

Injects the secret into an environment variable.

Why this answer

Secrets can be mounted as files or injected as environment variables using options like type=mount or type=env.

41
MCQhard

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

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

podman events streams real-time events from the Podman system.

Why this answer

The podman events command monitors container events in real time.

42
MCQeasy

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

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

Loads environment variables from a file.

Why this answer

The 'env_file' directive allows passing a .env file into containers or using them for interpolation.

43
MCQhard

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

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

podman top accepts standard ps options after the container name to customize output.

Why this answer

podman top displays the running processes of a container and accepts ps-compatible argument flags.

44
MCQmedium

An auditor notices that a container image runs its main application process as the 'root' user by default. Which Containerfile instruction can be added to ensure the container runs as a non-privileged user named 'appuser'?

A.EXEC appuser
B.PRIVILEGE drop appuser
C.RUN useradd -u 1000 appuser && chown -R appuser /app USER appuser
D.SECURITY --user=appuser
AnswerC

This creates the user, sets permissions, and switches to it.

Why this answer

Using USER appuser ensures that subsequent commands and the runtime process execute under that user account.

45
Multi-Selecthard

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

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

This pairing is a common best practice for flexible yet rigid executable containers.

Why this answer

ENTRYPOINT configures a container that will run as an executable; parameters in CMD can act as defaults or be overridden; and using exec form for ENTRYPOINT prevents container processes from receiving signals if not handled carefully, whereas shell form runs inside /bin/sh.

46
MCQhard

A container needs to read a secret named 'api_key' injected as a file at '/run/secrets/api_key'. What is the default destination path inside the container when mounting a secret without specifying a target?

A./var/run/secrets/
B./app/secrets/
C./etc/secrets/
D./run/secrets/
AnswerD

Secrets are mounted under /run/secrets/ by default.

Why this answer

By default, Podman mounts secrets into /run/secrets/ inside the container using the secret's name as the filename.

47
MCQmedium

You want to create a rigid container image where the container always executes a specific binary (/usr/bin/redis-server) and any arguments passed to 'podman run' are appended as arguments to that binary. Which instruction combination is best?

A.RUN /usr/bin/redis-server
B.CMD ["/usr/bin/redis-server", "--protected-mode", "no"]
C.ENV BIN=/usr/bin/redis-server CMD $BIN
D.ENTRYPOINT ["/usr/bin/redis-server"] CMD ["--protected-mode", "no"]
AnswerD

This makes the binary immutable as the entrypoint while allowing default or overridden arguments via CMD.

Why this answer

Using ENTRYPOINT in exec form combined with CMD allows default parameters that can be appended to the fixed entrypoint.

48
MCQeasy

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

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

Publishes all exposed ports to random host ports.

Why this answer

Using -P or --publish-all publishes all exposed ports to random high-numbered ports on the host.

49
Multi-Selectmedium

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

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

RUN supports both shell form and exec form.

Why this answer

Both RUN, CMD, and ENTRYPOINT support both shell form (e.g., RUN yum update) and exec form (e.g., RUN ["yum", "update"]). Among the options, RUN and CMD are standard examples.

50
MCQmedium

You need to inspect the disk space usage and detailed metadata of all managed volumes currently configured in Podman. Which command provides this information?

A.podman volume inspect
B.podman storage inspect volumes
C.podman volume ls --details
D.podman system df
AnswerA

Correct. podman volume inspect provides detailed volume configuration and metadata.

Why this answer

The podman volume inspect command displays detailed metadata for one or more volumes.

51
MCQeasy

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

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

podman run creates and starts a container from an image, and -d runs it in detached mode.

Why this answer

The podman run command with the -d (detached) flag starts a container in the background.

52
MCQeasy

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

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

EXPOSE informs Podman that the container listens on the specified network ports at runtime.

Why this answer

EXPOSE functions as a type of documentation between the person who builds the image and the person who runs the container.

53
Multi-Selecteasy

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

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

podman rmi removes an image reference or tag from storage.

Why this answer

Podman allows tagging existing images with 'podman tag' and removing tags/images with 'podman rmi'.

54
MCQhard

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

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

This inspect format string retrieves both the entrypoint and command configurations.

Why this answer

The entrypoint and command arguments are stored in .Config.Entrypoint and .Config.Cmd.

55
Multi-Selecthard

An administrator is troubleshooting an issue where a rootless container cannot access a host file because of SELinux denials. Which THREE statements accurately describe how SELinux interacts with rootless Podman containers on RHEL 9? (Choose three.)

Select 3 answers
A.Rootless containers run under the user's unprivileged process context and are still constrained by SELinux policy rules.
B.Rootless containers completely disable SELinux enforcement automatically upon startup.
C.Rootless containers require the container host to be booted with selinux=0 kernel parameter to function.
D.SELinux MCS (Multi-Category Security) label separation prevents rootless containers from escaping into other users' namespaces.
E.Rootless Podman processes cannot dynamically modify host file security contexts (such as via chcon) unless granted specific administrative capabilities.
AnswersA, D, E

SELinux mandatory access control applies to all processes on the system, including rootless container engines.

Why this answer

Rootless containers run in user namespaces. While they do not have root privileges, SELinux still applies constraints. Specifically, rootless containers run under an unprivileged user process label (such as unconfined_u:unconfined_r:unconfined_t:s0 or similar user-space mappings), cannot dynamically relabel arbitrary host paths using container tools with the same privileges as root, and rely on container process confinement governed by the active SELinux policy.

56
MCQmedium

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

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

Connects the specified container to the network.

Why this answer

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

57
MCQhard

An administrator wants to generate a systemd unit file for an existing Podman container named 'app_server' so that it can be managed as a system service. Which command should be used to generate this unit file and write it directly to the user systemd directory?

A.podman export systemd app_server > /etc/systemd/system/app_server.service
B.podman service generate --container app_server --output ~/.config/systemd/user/
C.podman generate systemd --new --files --name app_server
D.podman systemd create --name app_server > ~/.config/systemd/user/container-app_server.service
AnswerC

The 'podman generate systemd' command with '--new' and '--files' writes the unit file directly into the current working directory, which can then be moved to the systemd folder.

Why this answer

The 'podman generate systemd' command is used to create systemd unit files, and the '--new' flag ensures the unit file creates a new container on start rather than relying on an existing stopped container.

58
Multi-Selecteasy

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

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

podman rmi removes local container images.

Why this answer

'podman rmi' removes images and 'podman rm' removes containers.

59
MCQmedium

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

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

The --driver flag specifies non-default volume drivers.

Why this answer

The --driver (or -d) flag specifies the volume driver to use for managing the volume.

60
Multi-Selecthard

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

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

Correct. 'networks' connects the service to specified Compose networks.

Why this answer

In Compose files, 'ports' defines port mappings to the host, and 'networks' assigns the service to specific custom networks.

61
Multi-Selecteasy

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

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

The advanced key-value mount attachment flag.

Why this answer

The '-v' / '--volume' and '--mount' flags are used to attach storage to containers.

62
Multi-Selecthard

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

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

This inspect command successfully extracts the health status string from container metadata.

Why this answer

podman inspect with health format templates can retrieve health status, and health checks can be defined at run time using --health-cmd.

63
MCQmedium

You are writing a Podman Compose file and want to ensure a service depends on another service being fully started before it initializes. Which directive should you use?

A.depends_on
B.requires
C.wait_for
D.links_to
AnswerA

Specifies service startup dependencies.

Why this answer

The 'depends_on' directive controls startup order of services in compose files.

64
MCQeasy

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

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

Correct. Host port 8080 is mapped to container port 80.

Why this answer

The format for the --publish or -p flag is host_port:container_port. Thus, -p 8080:80 maps host port 8080 to container port 80.

65
MCQhard

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

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

--ip assigns a static IP on custom bridge networks.

Why this answer

The --ip flag is used with 'podman run' on a user-defined bridge network to allocate a specific static IP address to the container interface.

66
MCQeasy

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

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

Starts containers defined in the compose file in the background.

Why this answer

'podman-compose up -d' or 'podman compose up -d' starts all containers in background/detached mode.

67
Multi-Selecthard

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

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

Passes individual environment variables.

Why this answer

Environment variables can be supplied individually via '-e' / '--env' or in batch via '--env-file'.

68
Multi-Selecthard

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

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

ENV persists into the final image and is available at runtime.

Why this answer

ARG is build-time and doesn't persist, ENV persists into runtime, and sensitive values shouldn't be baked in.

69
MCQeasy

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

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

The docker:// transport explicitly tells Podman to pull from a Docker-compatible registry.

Why this answer

Podman supports explicit transport prefixes like docker://.

70
MCQmedium

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

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

.State.FinishedAt provides the timestamp when the container last stopped.

Why this answer

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

71
MCQmedium

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

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

The ':ro' suffix configures the mount as read-only.

Why this answer

Appending ':ro' to a volume or bind mount specification tells Podman to mount the source path in read-only mode inside the container.

72
MCQhard

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

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

System-wide Quadlet configuration files reside in /etc/containers/systemd/.

Why this answer

System-wide Quadlet files are placed in /etc/containers/systemd/.

73
Multi-Selecthard

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

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

Quadlet generator tools parse .container and other Quadlet files and generate corresponding systemd unit files on the fly.

Why this answer

Quadlet configuration files use specific extensions like .container and system-wide files reside in /etc/containers/systemd/.

74
MCQeasy

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

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

podman images lists local container images.

Why this answer

'podman images' lists all locally stored images.

75
Multi-Selectmedium

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

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

podman commit creates a new image from a container's changes.

Why this answer

podman export exports a container filesystem to a tarball, and podman commit creates an image from a container.

Page 1 of 5

Page 2

All pages