Skip to the content.

๐Ÿณ Docker Network Home Lab

Welcome to my Docker infrastructure documentation.

๐ŸŒ Network Overview

graph TB subgraph External IN["๐ŸŒ Internet"] CF["โ˜๏ธ Cloudflare Tunnel"] end subgraph "๐Ÿ–ฅ๏ธ Docker Host" RP["๐Ÿ”€ Traefik Reverse Proxy"] subgraph "๐ŸŽฏ Frontend Network" NG["๐ŸŒ Nginx"] GRAF["๐Ÿ“Š Grafana"] end subgraph "โš™๏ธ Backend Network" API["๐Ÿš€ API Service"] DB["๐Ÿ—„๏ธ PostgreSQL"] REDIS["โšก Redis Cache"] end subgraph "๐Ÿ“ก Monitoring Network" PROM["๐Ÿ“ˆ Prometheus"] NODE["๐Ÿ–ฅ๏ธ Node Exporter"] CADV["๐Ÿ“ฆ cAdvisor"] end end IN --> CF CF --> RP RP --> NG RP --> API RP --> GRAF API --> DB API --> REDIS PROM --> NODE PROM --> CADV GRAF --> PROM style IN fill:#1a1040,stroke:#ff00ff,stroke-width:3px,color:#fff style CF fill:#1a1a4e,stroke:#00ffff,stroke-width:3px,color:#fff style RP fill:#0f0f2d,stroke:#ff00ff,stroke-width:3px,color:#fff style NG fill:#1a1a4e,stroke:#00ffff,stroke-width:2px,color:#fff style GRAF fill:#1a1a4e,stroke:#00ffff,stroke-width:2px,color:#fff style API fill:#1a1a4e,stroke:#00ffff,stroke-width:2px,color:#fff style DB fill:#0f0f2d,stroke:#ff00ff,stroke-width:2px,color:#fff style REDIS fill:#0f0f2d,stroke:#ff00ff,stroke-width:2px,color:#fff style PROM fill:#1a1a4e,stroke:#00ffff,stroke-width:2px,color:#fff style NODE fill:#1a1a4e,stroke:#00ffff,stroke-width:2px,color:#fff style CADV fill:#1a1a4e,stroke:#00ffff,stroke-width:2px,color:#fff

๐Ÿ”ฎ Network Configuration

๐ŸŒ Network ๐Ÿ“ก Subnet ๐Ÿšช Gateway ๐ŸŽฏ Purpose
frontend 172.20.0.0/16 172.20.0.1 Public services
backend 172.21.0.0/16 172.21.0.1 Databases/Cache
monitoring 172.22.0.0/16 172.22.0.1 Observability

โšก Docker Commands

```bash

๐Ÿ“‹ List all networks

docker network ls

๐Ÿ” Inspect network details

docker network inspect frontend

๐Ÿš€ Create new network

docker network create โ€“driver bridge โ€“subnet 172.23.0.0/16 new-network

๐Ÿ”— Connect container to network

docker network connect frontend container-name