@@ -59,7 +59,7 @@ ENV HAPROXY_SHA256 {{ .sha256 }}
59
59
# Since 5.4 is supported on haproxy, better use it now, but only for
60
60
# newer versions since there could be some minor incompatibilities
61
61
# for existing scripts: https://www.lua.org/manual/5.4/manual.html#8
62
- if ([ "2.2", "2.4", "2.6", "2.8" ] | index(env.version) ) then
62
+ if env.version | IN( "2.2", "2.4", "2.6", "2.8") then
63
63
"5.3"
64
64
else
65
65
"5.4"
@@ -81,7 +81,7 @@ RUN set -eux; \
81
81
pcre2-dev \
82
82
readline-dev \
83
83
tar \
84
- {{ if ([ "2.2" ] | index(env.version)) then ( -}}
84
+ {{ if env.version == "2.2" then ( -}}
85
85
zlib-dev \
86
86
{{ ) else "" end -}}
87
87
; \
@@ -95,7 +95,7 @@ RUN set -eux; \
95
95
libssl-dev \
96
96
make \
97
97
wget \
98
- {{ if ([ "2.2" ] | index(env.version)) then ( -}}
98
+ {{ if env.version == "2.2" then ( -}}
99
99
zlib1g-dev \
100
100
{{ ) else "" end -}}
101
101
; \
@@ -122,15 +122,15 @@ RUN set -eux; \
122
122
USE_LUA=1 LUA_INC=/usr/include/lua{{ lua }}{{ if env.variant == "alpine" then (" LUA_LIB=/usr/lib/lua" + lua) else "" end }} \
123
123
USE_OPENSSL=1 \
124
124
USE_PCRE2=1 USE_PCRE2_JIT=1 \
125
- {{ if ([ "2.2" ] | index(env.version)) then ( -}}
125
+ {{ if env.version == "2.2" then ( -}}
126
126
USE_ZLIB=1 \
127
127
{{ ) else "" end -}}
128
- {{ if ([ "2.2" ] | index(env.version) | not) then ( -}}
128
+ {{ if env.version == "2.2" then "" else ( -}}
129
129
USE_PROMEX=1 \
130
- {{ ) else "" end -}}
130
+ {{ ) end -}}
131
131
\
132
132
EXTRA_OBJS=" \
133
- {{ if [ "2.2" ] | index(env.version) then ( -}}
133
+ {{ if env.version == "2.2" then ( -}}
134
134
# see https://github.com/docker-library/haproxy/issues/94#issuecomment-505673353 for more details about prometheus support
135
135
contrib/prometheus-exporter/service-prometheus.o \
136
136
{{ ) else "" end -}}
@@ -188,12 +188,12 @@ RUN set -eux; \
188
188
STOPSIGNAL SIGUSR1
189
189
190
190
COPY docker-entrypoint.sh /usr/local/bin/
191
- {{ if [ "2.2" ] | index(env.version) then ( -}}
191
+ {{ if env.version == "2.2" then ( -}}
192
192
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
193
193
{{ ) else "" end -}}
194
194
ENTRYPOINT ["docker-entrypoint.sh"]
195
195
196
- {{ if [ "2.2" ] | index(env.version) then ( -}}
196
+ {{ if env.version == "2.2" then ( -}}
197
197
# no USER for backwards compatibility (to try to avoid breaking existing users)
198
198
{{ ) else ( -}}
199
199
USER haproxy
0 commit comments