From e842283e9584a592b9133a4c55b58a8b38a2bf4c Mon Sep 17 00:00:00 2001 From: keith Date: Mon, 15 Jun 2026 12:07:00 +0000 Subject: [PATCH] Add docker/networks/README.md --- docker/networks/README.md | 62 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 docker/networks/README.md diff --git a/docker/networks/README.md b/docker/networks/README.md new file mode 100644 index 0000000..7c4b5d0 --- /dev/null +++ b/docker/networks/README.md @@ -0,0 +1,62 @@ +# Docker Networks + +## Purpose + +Docker networks allow containers to communicate with each other while remaining isolated from other containers and the host system. + +## Networks in Use + +| Network | Purpose | +| ------------------------ | ------------------------ | +| bridge | Default Docker network | +| compose-practice_default | Docker Compose nginx lab | +| gitea_default | Gitea service | +| npm_default | Nginx Proxy Manager | +| portainer_default | Portainer | +| uptime-kuma_default | Uptime Kuma | + +## Observations + +Each Docker Compose stack automatically creates its own network. + +Examples: + +| Service | Container IP | +| ------------------------ | ------------ | +| uptime-kuma | 172.17.0.2 | +| compose-practice-nginx-1 | 172.18.0.2 | +| gitea | 172.19.0.2 | +| npm | 172.20.0.2 | +| portainer | 172.21.0.2 | + +## Commands + +View networks: + +```bash +docker network ls +``` + +Inspect a network: + +```bash +docker network inspect NETWORK_NAME +``` + +Example: + +```bash +docker network inspect gitea_default +``` + +## Lessons Learned + +* Every Compose stack gets its own network. +* Containers communicate using private Docker IP addresses. +* Containers on separate networks cannot automatically communicate with each other. +* Docker networks provide isolation and security. +* Reverse proxies often require containers to share a network. + +## Date Created + +June 15, 2026