1
0
mirror of https://github.com/Tecnativa/docker-socket-proxy synced 2024-12-22 06:38:07 +00:00

feat: ability to modify bind

This commit is contained in:
Stanislav Vitko 2022-05-11 19:09:18 -07:00
parent 5dd3a1efb9
commit ab466fa9f2
No known key found for this signature in database
GPG Key ID: 9E51ED621568DA17
2 changed files with 3 additions and 2 deletions

View File

@ -27,5 +27,6 @@ ENV ALLOW_RESTARTS=0 \
SYSTEM=0 \
TASKS=0 \
VERSION=1 \
VOLUMES=0
VOLUMES=0 \
BIND=":2375"
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg

View File

@ -40,7 +40,7 @@ backend dockerbackend
server dockersocket $SOCKET_PATH
frontend dockerfrontend
bind :2375
bind $BIND
http-request deny unless METH_GET || { env(POST) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/((stop)|(restart)|(kill)) } { env(ALLOW_RESTARTS) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/auth } { env(AUTH) -m bool }