EX188 Sample Questions & Answers
The heaviest area is using Podman and a Containerfile to build images, ahead of running containers and reading their logs, troubleshooting containerized applications, handling image tags, keeping private registries secure, and working with multi-container stacks.
Launch the full EX188 simulator →Showing 6 of 12 free samples.
- Question 1Beginner
Implement Images Using Podman and Containerfile · Add Content and Configure Runtime Environment
A security audit requires that a specific directory
/opt/app/datain your container image be pre-populated with data from a tarball namedassets.tar.gz. The archive is located in the build context. You want the archive to be automatically extracted into the destination directory inside the image. Which Containerfile instruction should you use?Show answer & explanation
Correct answer: C
The
ADDinstruction has special functionality compared toCOPY. When the source is a local tar archive (identity, gzip, bzip2, or xz),ADDautomatically unpacks it into the destination directory.COPYwould just place the compressed file there. - Question 2Intermediate
Implement Images Using Podman and Containerfile · Container Volumes and Host Data Sharing
You are creating a custom database container that needs to initialize a data directory at runtime. You want to ensure that if the user mounts a host directory to
/var/lib/db, the appropriate SELinux context is applied so the container can write to it. Which Containerfile instruction defines this mount point to inform container runtimes of its purpose?Show answer & explanation
Correct answer: C
The
VOLUMEinstruction creates a mount point with the specified name and marks it as holding externally mounted volumes from native host or other containers. While the actual SELinux relabeling (z/Z) happens at runtime via the-vflag, declaringVOLUMEensures the directory exists and has correct permissions within the image structure for data persistence. - Question 3Intermediate
Implement Images Using Podman and Containerfile · Pass Environment Variables and Arguments
A developer is building a container that needs to accept a configuration value at build time to select a specific software version, but this value should NOT persist as an environment variable in the final running container. Which instruction should be used?
Show answer & explanation
Correct answer: D
ARGinstructions define variables that are only available during the build process (e.g., to be used in RUN instructions). UnlikeENV,ARGvalues are not persisted in the final image as environment variables for the running container. - Question 4Beginner
Implement Images Using Podman and Containerfile · Expose Ports from a Containerfile
You are reviewing a colleague's Containerfile for a Red Hat Enterprise Linux 9 based application. They want to expose port 8080 for the web service. Which statement accurately describes the effect of the
EXPOSE 8080instruction?Show answer & explanation
Correct answer: A
EXPOSEdoes not actually publish the port. It functions as documentation between the image builder and the person running the container. However, ifpodman run -P(uppercase P) is used, Podman will automatically map all EXPOSEd ports to random high-numbered ports on the host. - Question 5IntermediateSelect 2
Implement Images Using Podman and Containerfile · Specify the Container Base Image
Which TWO of the following statements are true regarding the use of Red Hat Universal Base Images (UBI)? (Select TWO)
Show answer & explanation
Correct answers: A, C
Red Hat UBI allows for free redistribution of container images built on top of it, even on non-Red Hat platforms.
UBI images are pre-configured to access a subset of RHEL repositories (UBI repositories) that allow package installation without requiring the host to be registered with subscription-manager, although the package set is limited compared to full RHEL.
- Question 6Advanced
Implement Images Using Podman and Containerfile · Specify the Command to Run in Custom Image
You need to define the default executable for a container. This executable should always run when the container starts and should accept arguments appended to the
podman runcommand. Which instruction combination achieves this?Show answer & explanation
Correct answer: A
By setting
ENTRYPOINT ["executable"], the container treats that executable as the main process. Any arguments provided topodman runare appended to it.CMDcan provide default arguments that are overridden if the user supplies their own.
Ready for the real thing?
The full EX188 simulator has every exam-style question, timed mode, and instant scoring.