Courseiva
Container Image BuildingmediumMultiple SelectObjective-mapped

EX188 Container Image Building Practice Question

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

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

RUN

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.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • WORKDIR

    Why it's wrong here

    WORKDIR accepts a directory path string, not shell/exec forms.

  • RUN

    Why this is correct

    RUN supports both shell form and exec form.

  • FROM

    Why it's wrong here

    FROM does not use exec form; it takes base image specifications.

  • CMD

    Why this is correct

    CMD supports both shell form and exec form.

  • ENV

    Why it's wrong here

    ENV uses key-value pairs and does not use shell or exec instruction syntax forms.

About these practice questions

This EX188 question is part of Courseiva's 296-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official Red Hat exam blueprint

This EX188 practice question is part of Courseiva's free Red Hat certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the EX188 exam.