@@ -59,7 +59,7 @@ ENV HAPROXY_SHA256 {{ .sha256 }}
5959 # Since 5.4 is supported on haproxy, better use it now, but only for
6060 # newer versions since there could be some minor incompatibilities
6161 # 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
6363 "5.3"
6464 else
6565 "5.4"
@@ -81,7 +81,7 @@ RUN set -eux; \
8181 pcre2-dev \
8282 readline-dev \
8383 tar \
84- {{ if ([ "2.2" ] | index(env.version)) then ( -}}
84+ {{ if env.version == "2.2" then ( -}}
8585 zlib-dev \
8686{{ ) else "" end -}}
8787 ; \
@@ -95,7 +95,7 @@ RUN set -eux; \
9595 libssl-dev \
9696 make \
9797 wget \
98- {{ if ([ "2.2" ] | index(env.version)) then ( -}}
98+ {{ if env.version == "2.2" then ( -}}
9999 zlib1g-dev \
100100{{ ) else "" end -}}
101101 ; \
@@ -122,15 +122,15 @@ RUN set -eux; \
122122 USE_LUA=1 LUA_INC=/usr/include/lua{{ lua }}{{ if env.variant == "alpine" then (" LUA_LIB=/usr/lib/lua" + lua) else "" end }} \
123123 USE_OPENSSL=1 \
124124 USE_PCRE2=1 USE_PCRE2_JIT=1 \
125- {{ if ([ "2.2" ] | index(env.version)) then ( -}}
125+ {{ if env.version == "2.2" then ( -}}
126126 USE_ZLIB=1 \
127127{{ ) else "" end -}}
128- {{ if ([ "2.2" ] | index(env.version) | not) then ( -}}
128+ {{ if env.version == "2.2" then "" else ( -}}
129129 USE_PROMEX=1 \
130- {{ ) else "" end -}}
130+ {{ ) end -}}
131131 \
132132 EXTRA_OBJS=" \
133- {{ if [ "2.2" ] | index(env.version) then ( -}}
133+ {{ if env.version == "2.2" then ( -}}
134134# see https://github.com/docker-library/haproxy/issues/94#issuecomment-505673353 for more details about prometheus support
135135 contrib/prometheus-exporter/service-prometheus.o \
136136{{ ) else "" end -}}
@@ -188,12 +188,12 @@ RUN set -eux; \
188188STOPSIGNAL SIGUSR1
189189
190190COPY docker-entrypoint.sh /usr/local/bin/
191- {{ if [ "2.2" ] | index(env.version) then ( -}}
191+ {{ if env.version == "2.2" then ( -}}
192192RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
193193{{ ) else "" end -}}
194194ENTRYPOINT ["docker-entrypoint.sh"]
195195
196- {{ if [ "2.2" ] | index(env.version) then ( -}}
196+ {{ if env.version == "2.2" then ( -}}
197197# no USER for backwards compatibility (to try to avoid breaking existing users)
198198{{ ) else ( -}}
199199USER haproxy
0 commit comments