@@ -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 ([ "2.0", "2. 2", "2.4", "2.6", "2.8" ] | index(env.version)) 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 ([ "2.0", "2. 2" ] | index(env.version)) 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 ([ "2.0", "2. 2" ] | index(env.version)) then ( -}}
99
99
zlib1g-dev \
100
100
{{ ) else "" end -}}
101
101
; \
@@ -110,7 +110,7 @@ RUN set -eux; \
110
110
\
111
111
{{
112
112
def haproxy_target:
113
- if env.variant == "alpine" then
113
+ if env.variant == "alpine" and env.version != "2.0" then
114
114
"linux-musl"
115
115
else
116
116
"linux-glibc"
@@ -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 ([ "2.0", "2. 2" ] | index(env.version)) then ( -}}
126
126
USE_ZLIB=1 \
127
127
{{ ) else "" end -}}
128
- {{ if ([ "2.2" ] | index(env.version) | not) then ( -}}
128
+ {{ if ([ "2.0", "2. 2" ] | index(env.version) | not) then ( -}}
129
129
USE_PROMEX=1 \
130
130
{{ ) else "" end -}}
131
131
\
132
132
EXTRA_OBJS=" \
133
- {{ if [ "2.2" ] | index(env.version) then ( -}}
133
+ {{ if [ "2.0", "2. 2" ] | index(env.version) 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,18 +188,18 @@ 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 [ "2.0", "2. 2" ] | index(env.version) 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 [ "2.0", "2. 2" ] | index(env.version) then ( -}}
197
197
# no USER for backwards compatibility (to try to avoid breaking existing users)
198
198
{{ ) else ( -}}
199
199
USER haproxy
200
200
{{ ) end -}}
201
201
202
- {{ if [ "2.2", "2.4", "2.6" ] | index(env.version) then ( -}}
202
+ {{ if [ "2.0", "2. 2", "2.4", "2.6" ] | index(env.version) then ( -}}
203
203
# no WORKDIR for backwards compatibility (to try to avoid breaking existing users)
204
204
{{ ) else ( -}}
205
205
# https://github.com/docker-library/haproxy/issues/200
0 commit comments