# 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