# Thanks to https://raesene.github.io/blog/2021/09/05/restricting-docker-access-with-a-proxy/ http://127.0.0.1:2379 { # Required by Metrika Agent for container discovery @containersurl { method GET path /v1.41/containers/json } # Required by Metrika Agent to stream container logs @containerlogsurl { method GET path /v1.41/containers//logs } # Required by Metrika Agent to track container state (i.e. restart, stop etc.) @eventsurl { method GET path /v1.41/events } reverse_proxy @containersurl unix///var/run/docker.sock reverse_proxy @containerlogsurl unix///var/run/docker.sock reverse_proxy @eventsurl unix///var/run/docker.sock } 127.0.0.1:2379 { # Drop requests with non-whitelisted paths respond "Request matched no routes in the caddy config." 404 }