EX188 Sample Questions

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.

  1. Question 1Beginner

    Implement Images Using Podman and Containerfile · Add Content and Configure Runtime Environment

    A security audit requires that a specific directory /opt/app/data in your container image be pre-populated with data from a tarball named assets.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 ADD instruction has special functionality compared to COPY. When the source is a local tar archive (identity, gzip, bzip2, or xz), ADD automatically unpacks it into the destination directory. COPY would just place the compressed file there.

  2. 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 VOLUME instruction 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 -v flag, declaring VOLUME ensures the directory exists and has correct permissions within the image structure for data persistence.

  3. 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

    ARG instructions define variables that are only available during the build process (e.g., to be used in RUN instructions). Unlike ENV, ARG values are not persisted in the final image as environment variables for the running container.

  4. 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 8080 instruction?

    Show answer & explanation

    Correct answer: A

    EXPOSE does not actually publish the port. It functions as documentation between the image builder and the person running the container. However, if podman run -P (uppercase P) is used, Podman will automatically map all EXPOSEd ports to random high-numbered ports on the host.

  5. 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.

  6. 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 run command. 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 to podman run are appended to it. CMD can 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.

Go to the EX188 simulator →