Docker Socket Proxy

Docker Socket Proxy

Security-enhanced proxy to restrict Docker socket API access

2.2kstars
189forks
Last commit: 1mo ago
Repo age: 9y old

Docker Socket Proxy is a security-enhanced proxy for the Docker socket.

  • It sits between clients and the Docker daemon and blocks access to sensitive API endpoints based on per-endpoint allow/deny rules driven by environment variables.
  • The proxy runs as an Alpine-based HAProxy container and uses a small configuration to enforce the ACLs, returning HTTP 403 Forbidden for disallowed requests.

Key Features

  • ACL-driven access control via environment variables that map to Docker API prefixes (eg. /auth, /containers, /images, /volumes, etc.).
  • Default allowances for safe endpoints (eg. EVENTS, PING, VERSION) with fine-grained revocation for security-critical areas.
  • Simple deployment model: run a privileged container that mounts the host Docker socket and exposes a proxy port.
  • Socket-location flexibility via SOCKET_PATH to support non-standard Docker socket paths.
  • Configurable logging through a LOG_LEVEL setting.
  • Clear security guidance: avoid exposing the proxy publicly and rely on Docker network isolation.
  • Image tagging supports versioned releases, latest, and edge builds for development.

Use Cases

  • Expose Docker API to a single service or CI tool with restricted permissions, reducing blast radius if the service is compromised.
  • Place the proxy behind a network firewall or within a private network segment to limit access to the Docker daemon.
  • Point clients to the proxy (via DOCKER_HOST=tcp://host:2375) instead of the raw Docker socket to enforce ACLs without changing client code.

Limitations and Considerations

  • TLS support is not included; the proxy provides a plain HTTP front for the host Docker socket. Plan to terminate TLS at a separate layer or keep the proxy on a secured network.
  • The container must run privileged because it connects to the Docker socket, which carries security implications.
  • Some workflows may require enabling additional API sections; review and adjust environment variables to match your needs.

Conclusion

Docker Socket Proxy offers a straightforward ACL-based barrier between clients and the Docker daemon, enabling safer integrations where Docker access is necessary but tightly controlled. It is quick to deploy in a containerized environment, but requires careful network and permission configurations to maintain security.

Categories:

Tags:

Tech Stack:

Share:

Similar Services

Netdata

Netdata

Real-time, per‑second full‑stack monitoring and observability

77.4k
6.3k
Last commit: 16h ago

Open-source, agent-based monitoring platform delivering per-second metrics, edge ML anomaly detection, tiered time-series storage and centralized cloud UI.

Alternative to:
Datadog Cloud Monitoring
Datadog Cloud Monitoring
+16
Coolify

Coolify

Self-hosted PaaS for deploying apps, databases, and services

49.6k
3.4k
Last commit: 1d ago

Open-source, self-hostable PaaS to deploy websites, full-stack apps, databases, and Docker services on your own servers with Git-based CI/CD workflows.

Alternative to:
Heroku
Heroku
+12
Portainer

Portainer

Web UI and API for managing Docker and Kubernetes environments

36.2k
2.8k
Last commit: 2d ago

Lightweight web-based platform to manage Docker, Swarm and Kubernetes resources with a GUI and API, including access control and multi-environment operations.

Alternative to:
Portainer Business Edition (Portainer Cloud)
Portainer Business Edition (Portainer Cloud)
+6
CasaOS

CasaOS

Personal cloud dashboard and app store for Docker-based home servers

32.9k
1.8k
Last commit: 5mo ago

Open-source personal cloud system with a web dashboard, app store, and file management to run and manage Docker apps on home servers and SBCs.

Alternative to:
Cloudron
Cloudron
+19
Dokku

Dokku

Docker-powered PaaS for deploying apps on a single host

31.8k
2k
Last commit: 7d ago

Dokku is a self-hosted, Docker-based mini PaaS that lets you deploy Heroku-style apps via Git push, using buildpacks or Dockerfiles with plugin-managed services.

Alternative to:
Dokku Cloud
Dokku Cloud
+10
Dokploy

Dokploy

Self-hosted PaaS to deploy and manage containerized apps and databases.

29.1k
1.9k
Last commit: 1d ago

Open-source self-hostable PaaS for deploying containerized applications and managing databases with Docker Compose, Traefik, monitoring, and backups.

Alternative to:
Vercel
Vercel
+9