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
2
2
3
3
EXPOSE 2375
4
4
ENV ALLOW_RESTARTS=0 \
@@ -33,3 +33,5 @@ ENV ALLOW_RESTARTS=0 \
33
33
VOLUMES=0
34
34
COPY docker-entrypoint.sh /usr/local/bin/
35
35
COPY 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
15
15
esac
16
16
17
17
# 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
19
19
20
20
# first arg is `-f` or `--some-option`
21
21
if [ " ${1# -} " != " $1 " ]; then
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ backend docker-events
46
46
frontend dockerfrontend
47
47
bind ${BIND_CONFIG}
48
48
http-request deny unless METH_GET || { env(POST) -m bool }
49
+
50
+ # Allowed endpoints
49
51
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 }
50
52
http-request allow if { path,url_dec -m reg -i ^(/v[\ d\ .]+)?/containers/[a-zA-Z0-9_.-]+/start } { env(ALLOW_START) -m bool }
51
53
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 1
1
[tool .poetry ]
2
2
name = " docker-socket-proxy"
3
- version = " 0 .0.0"
3
+ version = " 1 .0.0"
4
4
description = " "
5
5
authors = [" Tecnativa" ]
6
+ package-mode = false
6
7
7
8
[tool .poetry .dependencies ]
8
9
python = " ^3.8"
You can’t perform that action at this time.
0 commit comments