File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1- FROM haproxy:2.2 -alpine
1+ FROM haproxy:3.2.4 -alpine
22
33EXPOSE 2375
44ENV ALLOW_RESTARTS=0 \
@@ -33,3 +33,5 @@ ENV ALLOW_RESTARTS=0 \
3333 VOLUMES=0
3434COPY docker-entrypoint.sh /usr/local/bin/
3535COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg.template
36+ USER root
37+ CMD ["haproxy" , "-f" , "/tmp/haproxy.cfg" ]
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ case "$DISABLE_IPV6_LOWER" in
1515esac
1616
1717# Process the HAProxy configuration template using sed
18- sed " s/\$ {BIND_CONFIG}/$BIND_CONFIG /g" /usr/local/etc/haproxy/haproxy.cfg.template > /usr/local/etc/haproxy /haproxy.cfg
18+ sed " s/\$ {BIND_CONFIG}/$BIND_CONFIG /g" /usr/local/etc/haproxy/haproxy.cfg.template > /tmp /haproxy.cfg
1919
2020# first arg is `-f` or `--some-option`
2121if [ " ${1# -} " != " $1 " ]; then
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ backend docker-events
4646frontend dockerfrontend
4747 bind ${BIND_CONFIG}
4848 http-request deny unless METH_GET || { env(POST) -m bool }
49+
50+ # Allowed endpoints
4951 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 }
5052 http-request allow if { path,url_dec -m reg -i ^(/v[\ d\ .]+)?/containers/[a-zA-Z0-9_.-]+/start } { env(ALLOW_START) -m bool }
5153 http-request allow if { path,url_dec -m reg -i ^(/v[\ d\ .]+)?/containers/[a-zA-Z0-9_.-]+/stop } { env(ALLOW_STOP) -m bool }
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " docker-socket-proxy"
3- version = " 0 .0.0"
3+ version = " 1 .0.0"
44description = " "
55authors = [" Tecnativa" ]
6+ package-mode = false
67
78[tool .poetry .dependencies ]
89python = " ^3.8"
You can’t perform that action at this time.
0 commit comments