EX188 Container Image Building Practice Question
An auditor reviewing your Containerfile notices an EXPOSE instruction for port 80. What is the primary function of the EXPOSE instruction?
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
✓
It documents which ports the container listens on at runtime.
The EXPOSE instruction informs Podman that the container listens on the specified network ports at runtime. It functions as a type of documentation between the person who builds the image and the person who runs the container, though ports can still be published manually via flags.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
It documents which ports the container listens on at runtime.
Why this is correct
EXPOSE acts as metadata/documentation indicating intended network ports.
- ✗
It opens firewall ports on the underlying RHEL host system permanently.
Why it's wrong here
EXPOSE has no direct interaction with the host firewall rules or firewalld.
- ✗
It encrypts network traffic entering the specified container port.
Why it's wrong here
EXPOSE provides no encryption or security features.
- ✗
It automatically publishes all exposed ports to random host ports without flags.
Why it's wrong here
Ports are only published to the host if explicitly requested using the -p or -P flag during podman run.
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.