A FastAPI app that connects to the local Docker daemon and exposes a JSON summary of containers, volumes, and images, plus a tiny browser UI.
- Lists all containers with status, image tags, and ports
- Marks named volumes as orphaned if they are not mounted by any container
- Counts local images
- Docker Compose and Dockerfile included
app.py— FastAPI app and Docker SDK integrationDockerfile— Container image builddocker-compose.yml— Runs the app with /var/run/docker.sock mounted
- Docker and Docker Compose
- Access to /var/run/docker.sock
git clone https://github.com/biprajit007/docker-environment-inspector.git
cd docker-environment-inspector
docker compose up --buildhttp://localhost:18080/curl http://localhost:18080/api/summary- Mounting the Docker socket gives the container broad control over the Docker host. Use only on trusted systems and networks.
- Read-only in the current code, but the mounted socket is still sensitive
- No authentication or pagination
- Large Docker environments may produce large JSON responses