EX188 Container Image Building Practice Question
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?
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
✓
ENTRYPOINT ["/usr/bin/redis-server"] CMD ["--protected-mode", "no"]
Using ENTRYPOINT in exec form combined with CMD allows default parameters that can be appended to the fixed entrypoint.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
RUN /usr/bin/redis-server
Why it's wrong here
RUN executes during the build, not container start.
- ✗
CMD ["/usr/bin/redis-server", "--protected-mode", "no"]
Why it's wrong here
Using only CMD makes it very easy for the user to override the binary entirely by passing arguments to podman run.
- ✗
ENV BIN=/usr/bin/redis-server CMD $BIN
Why it's wrong here
Using shell expansion with ENV does not lock down the entrypoint effectively.
- ✓
ENTRYPOINT ["/usr/bin/redis-server"] CMD ["--protected-mode", "no"]
Why this is correct
This makes the binary immutable as the entrypoint while allowing default or overridden arguments via CMD.
About these practice questions
One of 301 original EX188 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.