You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A production-ready Go REST API that exposes a simplified wrapper around the Docker Engine API. Supports container lifecycle management, images, volumes, networks, system info, and per-container resource metrics from a single distroless binary with no CLI dependency.
# Docker daemon and host info
curl -s http://localhost:8080/system/info | jq .# Disk usage breakdown
curl -s http://localhost:8080/system/disk | jq .
Images
# List images
curl -s http://localhost:8080/images | jq .# Pull an image
curl -s -X POST "http://localhost:8080/images/pull?image=alpine:latest"# {"status":"pulled","image":"alpine:latest"}# Inspect an image
curl -s http://localhost:8080/images/alpine:latest | jq .# Remove an image
curl -s -X DELETE http://localhost:8080/images/alpine:latest
# {"id":"alpine:latest","status":"removed"}
Volumes
# List volumes
curl -s http://localhost:8080/volumes | jq .# Create a volume
curl -s -X POST http://localhost:8080/volumes \
-H "Content-Type: application/json" \
-d '{"name":"my-volume","driver":"local"}'# Inspect a volume
curl -s http://localhost:8080/volumes/my-volume | jq .# Remove a volume
curl -s -X DELETE http://localhost:8080/volumes/my-volume
# Prune unused volumes
curl -s -X POST http://localhost:8080/volumes/prune | jq .
Networks
# List networks
curl -s http://localhost:8080/networks | jq .# Create a network
curl -s -X POST http://localhost:8080/networks \
-H "Content-Type: application/json" \
-d '{"name":"my-net","driver":"bridge"}'# Inspect a network
curl -s http://localhost:8080/networks/my-net | jq .# Connect a container to a network
curl -s -X POST http://localhost:8080/networks/my-net/connect \
-H "Content-Type: application/json" \
-d '{"container":"my-container"}'# Disconnect a container from a network
curl -s -X POST http://localhost:8080/networks/my-net/disconnect \
-H "Content-Type: application/json" \
-d '{"container":"my-container","force":false}'# Remove a network
curl -s -X DELETE http://localhost:8080/networks/my-net
# Prune unused networks
curl -s -X POST http://localhost:8080/networks/prune | jq .
Health probe
The compiled binary doubles as its own container health check client via the --healthcheck flag, so no curl or wget is needed in the distroless runtime image:
HEALTHCHECK CMD ["/docker-api", "--healthcheck"]
Security considerations
Non-root user: The container runs as UID 65532 (nonroot).
Socket mount:/var/run/docker.sock is mounted so the API can talk to the Docker daemon.
Minimal image: The distroless runtime contains only the statically compiled binary — no shell, no package manager, no libc.
Static binary: Built with CGO_ENABLED=0; no shared library dependency.
For stricter production deployments consider fronting the Docker socket with Tecnativa docker-socket-proxy to allow-list only the specific API calls this service requires.