Description
docker-socket-proxy is a security-focused proxy for the Docker socket. Giving a service access to the Docker socket can mean root access to the host or even a whole swarm, but some services need the socket to react to events. This proxy lets you block the parts of the Docker API that a service should not use. It is built on the official Alpine-based HAProxy image with a small configuration file, and it returns HTTP 403 Forbidden for requests that are blocked. You grant or revoke access to sections of the Docker API through environment variables, which match the URL prefixes. The README's security recommendations say never to expose the proxy's port to a public network, to revoke any API section the service does not need, and to know the API version you are using. The image does not include TLS, because it is meant to sit behind Docker networking and host firewall rules. The README gives a usage example that publishes the proxy on localhost and shows a request being blocked.…
Highlights
- Restricts which Docker API calls are allowed
- Environment variables to grant or revoke sections
- Alpine-based HAProxy image
- Returns 403 for blocked requests
Ratings & Reviews
No ratings yet
Be the first to rate Docker Socket Proxy.
People also visit
Ufw Docker Automated
Manage UFW (Uncomplicated Firewall) rules for Docker containers
Docker Socket Proxy FAQ
What does docker-socket-proxy do?
It sits in front of the Docker socket and blocks the API calls you do not want a service to make.
How do I allow or block a section?
Use environment variables that match the API URL prefixes, such as AUTH for the auth section.
What happens to a blocked request?
The proxy returns HTTP 403 Forbidden.
Should the port be public?
No. The README says never to expose it to a public network.
Does it support TLS?
No. It is plain HTTP, meant to be restricted through Docker networking and firewall rules.
How do I run it?
Run the tecnativa/docker-socket-proxy image with the Docker socket mounted, and publish the port on localhost.
What are the best Docker Socket Proxy alternatives?
Popular alternatives to Docker Socket Proxy include Socket Proxy, nginx-proxy and Nginx Proxy Manager. See all Docker Socket Proxy alternatives
