Courseiva

EX188 · topic practice

Container Image Building practice questions

This domain covers authoring Containerfiles to build OCI images with Podman and Buildah. You are tested on choosing instructions correctly, layering and caching behavior, passing build arguments, setting runtime defaults, and keeping images small and reproducible through practical build-and-inspect tasks.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: Container Image Building

What the exam tests

What to know about Container Image Building

Build working images from a Containerfile: pick the right instructions, order steps for cache reuse, pass build arguments, and set ENTRYPOINT with overridable CMD defaults. The key is understanding layer caching and keeping cleanup in the same RUN instruction that created the files.

Selecting Containerfile instructions such as FROM, RUN, COPY, ENV, ENTRYPOINT, CMD, and LABEL correctly

Using podman build with tags, build arguments, and alternate Containerfile paths

Understanding layer caching so unchanged instructions and copied files are reused

Reducing image size by cleaning package manager caches inside the same RUN step

Watch out for

Common Container Image Building exam traps

  • ▸Confusing CMD and ENTRYPOINT: CMD supplies overridable default arguments, while ENTRYPOINT sets the executable that receives them
  • ▸Copying the whole build context before installing dependencies, which invalidates the cache whenever any unrelated file changes
  • ▸Running a package install in one RUN and cache cleanup in a later RUN, so the removed files still occupy an earlier layer

Practice set

Container Image Building questions

20 questions · select your answer, then reveal the explanation

A container image needs to automatically extract a local tar archive file named 'app.tar.gz' into the destination directory '/opt/app' during the build process. Which instruction should be used?

You are troubleshooting a build where a RUN instruction fails because it cannot reach a remote URL to download a file. The local network uses an HTTP proxy. How should you pass the proxy settings to the build command without hardcoding them into the image?

You are writing a Containerfile and need to ensure that the default command executed when the container starts can be easily overridden by passing arguments on the podman run command line. Which instruction should you use?

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?

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'?

You need to label your container image with maintainer details and version metadata according to OCI annotation standards. Which instruction should you use?

You want to ensure that if any command in a multi-command RUN instruction fails, the entire container build process fails immediately. What shell option should be set or is default in Containerfiles?

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?

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

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

Which THREE statements are true concerning how Podman builds container images and utilizes the build context? (Choose three.)

Which THREE conditions or practices can cause layer cache invalidation during a 'podman build' operation? (Choose three.)

Which THREE advanced configuration steps or flags are available when performing rootless builds or utilizing buildah/podman build advanced features? (Choose three.)

A Containerfile contains the line `COPY app.conf /etc/myapp/app.conf`. During the build, podman reports that the file `app.conf` is not found even though it exists on the host machine in the same directory as the Containerfile. Which explanation best describes the cause?

When writing a Containerfile, which instruction specifies the base image to be used for the subsequent build steps?

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

A developer wants to build a container image using podman build, but the Containerfile is named 'Customfile' and located in a subdirectory named 'dockerfiles'. Which command accomplishes this?

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?

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

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

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Container Image Building sessions

Start a Container Image Building only practice session

Every question in these sessions is drawn from the Container Image Building domain — nothing else.

Related practice questions

Related EX188 topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the EX188 exam test about Container Image Building?
Build working images from a Containerfile: pick the right instructions, order steps for cache reuse, pass build arguments, and set ENTRYPOINT with overridable CMD defaults. The key is understanding layer caching and keeping cleanup in the same RUN instruction that created the files.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Container Image Building questions in a focused session?
Yes — the session launcher on this page draws every question from the Container Image Building domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other EX188 topics?
Use the topic links above to move to related areas, or go back to the EX188 question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the EX188 exam covers. They are not copied from any real exam or dump site.