DELAPARRA
Index
Color
NL
Category: Docker

host

Explained by Updated

What is host?

host: The container shares the host's network stack directly — no isolation, no port mapping needed. Linux only. With the host network mode, a container shares the host machine's network directly. There is no separate container IP and no port mapping; an app listening on port 8080 in the container is on port 8080 of the host.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about host

How is host used in practice?

It removes a small amount of network overhead and makes some tools easier, such as network monitoring agents that need to see the host's traffic.

What should you keep in mind with host?

It also removes isolation. The container can reach every service on the host, and port conflicts between containers become your problem. Host networking only works this way on Linux; on Docker Desktop for Mac and Windows it behaves differently. For normal applications, a bridge network with published ports is the safer default.

What does an example of host look like?

docker run --network host nginx

At a glance

CategoryDocker
Explained by
Updated

More Docker terms

All terms starting with H

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.