A tiny local web app that shows the live status of every Docker container on your machine in one browser page — CPU/memory/network stats, start/stop/ restart controls, and live streaming logs.
It talks directly to your local Docker daemon (the same one the docker CLI
uses) via its Unix socket, so no remote setup is needed.
- Python 3.9+
- Docker Desktop / Docker Engine running locally
- Your user must be able to run
docker pswithoutsudo(i.e. you're in thedockergroup on Linux, or using Docker Desktop on Mac/Windows)
cd docker-dashboard
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtpython app.pyThen open http://localhost:8008 in your browser.
The page auto-refreshes every 3 seconds. Click Logs on any container to open a live streaming log panel (via WebSocket). Use Start / Stop / Restart to control containers directly from the dashboard.
- Permission denied talking to Docker: on Linux, add your user to the
dockergroup (sudo usermod -aG docker $USER, then log out/in), or run the app withsudo. - Port 8008 already in use: change the port at the bottom of
app.py(uvicorn.run(app, host="0.0.0.0", port=8008)). - Windows named pipe:
docker.from_env()also works with Docker Desktop on Windows automatically; no extra config needed. - This is designed for local, single-host use — it's a thin wrapper around the Docker SDK, not an auth-protected multi-user service. Don't expose port 8008 to the open internet as-is.
app.py— FastAPI backend using thedockerPython SDK:GET /api/containers— list all containers with status/health/portsGET /api/containers/{id}/stats— one-shot CPU/mem/net/block statsPOST /api/containers/{id}/{start|stop|restart|pause|unpause}WS /ws/logs/{id}— streamsdocker logs -foutput live
static/index.html— single-page vanilla JS/CSS dashboard, polls the REST endpoints and opens a WebSocket per log view. No build step, no frameworks.
- Add a text filter/search box for container name or image
- Add container creation (
docker runform) if you want it to do more than view/control existing containers - Persist historical CPU/mem graphs (currently only shows the live snapshot)
- Add basic auth (e.g. HTTP Basic via FastAPI middleware) if you ever expose it beyond localhost