host network
A mode where a container uses the host network directly instead of getting its own.
In more detail
With --network host the container shares the host network namespace: no port publishing is needed and ports clash with host services. It removes a layer of isolation and behaves differently on Docker Desktop, so use it only when you need it.
Related terms
- network namespace — The namespace that gives a process its own network interfaces, addresses, routes and ports.
- bridge network — The default Docker network type: a private network inside the host that containers join, with its own private addresses.
- port publishing — Forwarding a port on the host to a port inside a container so the service can be reached from outside.
Taught in
- Kubernetes Pod Security Standards: Baseline & Restricted — Cloud Security & DevSecOps Engineering
- Bridge Networks, DNS And Container Communication — Docker Architecture & Production Containers
- Port 30080 On Every Node: kube-proxy, Networking And Clients — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Created, But Never Running: Pod Security Admission — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- The Report That Ate The Node: Denial Of Service And Malicious Code — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Audit Day: Final Review — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep