EX188 Container Image Building Practice Question
Which THREE directives or practices are associated with implementing secure container builds and adhering to least-privilege principles? (Choose three.)
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
✓
Using minimal, trusted base images to reduce the total software footprint and vulnerability surface.
Secure builds involve using non-root users, secure secret mounting, and trusted base images.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Hardcoding database passwords directly into ENV instructions so the application can read them easily.
Why it's wrong here
Hardcoding secrets in ENV is a major security vulnerability.
- ✓
Using minimal, trusted base images to reduce the total software footprint and vulnerability surface.
Why this is correct
Minimal base images reduce vulnerabilities.
- ✓
Adding a 'USER' instruction with a non-root UID/username before defining the runtime CMD or ENTRYPOINT.
Why this is correct
Running as non-root enhances container runtime security.
- ✗
Running all RUN instructions with '--privileged' inside the Containerfile.
Why it's wrong here
Containerfiles do not support a --privileged flag on RUN instructions.
- ✓
Using build-time secrets with '--secret' mounts rather than baking credentials into image layers.
Why this is correct
Build secrets prevent credentials from persisting in image layers.
About these practice questions
Courseiva writes every EX188 question from scratch — 301 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.