Courseiva
Manage containers →mediumMultiple Choice

EX200 Manage containers Practice Question

Exhibit

Refer to the exhibit.

$ podman inspect webserver | grep -A5 '"Ports"'
"Ports": {
    "80/tcp": [
        {
            "HostPort": "8080"
        }
    ]
}

Based on the exhibit, which statement about the container 'webserver' is true?

⚠ Common exam trap

Many candidates confuse the order of port mapping, thinking the first number is the container port and the second is the host port, when in fact the syntax is `host_port:container_port`.

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

✓

Container port 80 is mapped to host port 8080.

The exhibit shows the container 'webserver' with port mapping '0.0.0.0:8080->80/tcp'. This indicates that host port 8080 is mapped to container port 80, meaning traffic arriving at the host on port 8080 is forwarded to port 80 inside the container. Therefore, option A is correct.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Container port 80 is mapped to host port 8080.

    Why this is correct

    The exhibit's PORTS column displays 0.0.0.0:8080->80/tcp, which uses Docker's host_port:container_port syntax. This means traffic sent to port 8080 on any host interface is forwarded to TCP port 80 inside the container, so container port 80 is indeed mapped to host port 8080. The wildcard 0.0.0.0 binding indicates the port is published on all of the host's network interfaces.

  • ✗

    The container uses the host network.

    Why it's wrong here

    Host-network containers do not get a port mapping line at all; they bind directly to the host's network stack and would show no NAT-style PORTS arrow. The existence of 0.0.0.0:8080->80/tcp indicates the container is attached to a bridge network (default docker0) where iptables DNAT rules and the docker-proxy userland process handle inbound connections. Therefore the statement 'the container uses the host network' is false, as host networking would bypass the bridge and NAT entirely.

  • ✗

    Container port 8080 is mapped to host port 80.

    Why it's wrong here

    This reverses the actual direction of the published port. Docker's PORTS notation 0.0.0.0:8080->80/tcp always means the host port appears on the left of the '->' and the container port on the right, so the mapping is host port 8080 to container port 80. If container port 8080 were mapped to host port 80, the output would instead read 0.0.0.0:80->8080/tcp. Since the exhibit shows the opposite order, this statement is incorrect.

  • ✗

    No port mapping exists.

    Why it's wrong here

    The output clearly contains a PORTS entry: 0.0.0.0:8080->80/tcp. This is Docker's convention for a published (mapped) port, and it creates an inbound NAT rule so the container's port 80 can be reached from the host's port 8080. If no mapping existed, the container might still expose port 80 in its image metadata, but the PORTS column would only show '80/tcp' or would be empty, with no host-port arrow.

About these practice questions

Courseiva writes every EX200 question from scratch — 427 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This EX200 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 EX200 exam.