Intermediate
Docker & Containers
Q64 / 100
What does the "--network host" option do when running a container?
Correct! Well done.
Incorrect.
The correct answer is B) It removes network isolation between the container and the host, so the container shares the host's network stack directly, including its IP address and ports
B
Correct Answer
It removes network isolation between the container and the host, so the container shares the host's network stack directly, including its IP address and ports
Explanation
"--network host" makes the container use the host's network namespace directly — ports opened in the container are immediately available on the host without explicit "-p" mapping, but this reduces isolation.
Progress
64/100