Docker network
A virtual network Docker creates so containers can talk to each other and, if allowed, to the outside world.
In more detail
On a user-defined network, containers can reach each other by container name through Docker's built-in DNS. Containers on different networks cannot reach each other unless connected to a shared one.
Examples
docker network create appnetdocker network create m01l01-netRelated terms
- bridge network — The default Docker network type: a private network inside the host that containers join, with its own private addresses.
- host network — A mode where a container uses the host network directly instead of getting its own.
- DNS — The system that turns names such as learnsome.tech into IP addresses.
- port publishing — Forwarding a port on the host to a port inside a container so the service can be reached from outside.
- container name — A human-readable name you give a container with --name, so you can refer to it without copying its ID.
- advertised address — The host name and port a broker tells clients to use when they connect back to it, set in Redpanda with --advertise-kafka-addr.
Taught in
- Run The Spine Service And Publish Its Port — Docker Architecture & Production Containers
- Bridge Networks, DNS And Container Communication — Docker Architecture & Production Containers
- Define The Service And Database With Compose — Docker Architecture & Production Containers
- Why A Log And Not A Queue — Apache Kafka & Event Streaming
- Starting A Broker And Reading Its Metadata — Apache Kafka & Event Streaming