@@ -30,15 +30,15 @@ ENV NGINX_VERSION=$NGINX_VERSION
30
30
ADD nginx-$NGINX_VERSION.tar.gz /tmp/
31
31
32
32
WORKDIR /tmp
33
- RUN wget https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.gz && tar xzvf pcre- 8.44.tar.gz
34
- RUN wget https://www.zlib.net/zlib-1.2.11 .tar.gz && tar xzvf zlib- 1.2.11 .tar.gz
35
- RUN CONFIG_OPTS="--with-pcre=../pcre-8.44 --with-zlib=../zlib-1.2.11 " ./configure && make
33
+ RUN wget https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.gz && mkdir -p pcre && tar -xz -C pcre -f pcre- 8.44.tar.gz --strip-components=1
34
+ RUN wget https://www.zlib.net/zlib-1.2.12 .tar.gz && mkdir -p zlib && tar -xz -C zlib -f zlib- 1.2.12 .tar.gz --strip-components=1
35
+ RUN CONFIG_OPTS="--with-pcre=../pcre --with-zlib=../zlib" ./configure && make
36
36
37
37
# #####
38
- FROM centos:7 as centos7 -builder
38
+ FROM ubuntu:22.04 as ubuntu22 -builder
39
39
40
- RUN yum install -y \
41
- gcc pcre-devel zlib-devel make
40
+ RUN apt-get update && \
41
+ apt-get install -y build-essential wget
42
42
43
43
COPY configure /tmp
44
44
COPY config /tmp
@@ -49,10 +49,12 @@ ENV NGINX_VERSION=$NGINX_VERSION
49
49
ADD nginx-$NGINX_VERSION.tar.gz /tmp/
50
50
51
51
WORKDIR /tmp
52
- RUN ./configure && make
52
+ RUN wget https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.gz && mkdir -p pcre && tar -xz -C pcre -f pcre-8.44.tar.gz --strip-components=1
53
+ RUN wget https://www.zlib.net/zlib-1.2.12.tar.gz && mkdir -p zlib && tar -xz -C zlib -f zlib-1.2.12.tar.gz --strip-components=1
54
+ RUN CONFIG_OPTS="--with-pcre=../pcre --with-zlib=../zlib" ./configure && make
53
55
54
56
# #####
55
- FROM quay.io/ centos/centos:stream8 as centos8 -builder
57
+ FROM centos:7 as centos7 -builder
56
58
57
59
RUN yum install -y \
58
60
gcc pcre-devel zlib-devel make
@@ -69,10 +71,10 @@ WORKDIR /tmp
69
71
RUN ./configure && make
70
72
71
73
# #####
72
- FROM debian:stretch as debian9 -builder
74
+ FROM quay.io/centos/centos:stream9 as centos-stream9 -builder
73
75
74
- RUN apt update && apt install -y \
75
- wget build-essential git tree software-properties-common dirmngr apt-transport-https ufw
76
+ RUN yum install -y \
77
+ gcc pcre-devel zlib-devel make
76
78
77
79
COPY configure /tmp
78
80
COPY config /tmp
@@ -83,9 +85,7 @@ ENV NGINX_VERSION=$NGINX_VERSION
83
85
ADD nginx-$NGINX_VERSION.tar.gz /tmp/
84
86
85
87
WORKDIR /tmp
86
- RUN wget https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.gz && tar xzvf pcre-8.44.tar.gz
87
- RUN wget https://www.zlib.net/zlib-1.2.11.tar.gz && tar xzvf zlib-1.2.11.tar.gz
88
- RUN CONFIG_OPTS="--with-pcre=../pcre-8.44 --with-zlib=../zlib-1.2.11" ./configure && make
88
+ RUN ./configure && make
89
89
90
90
# #####
91
91
FROM debian:buster as debian10-builder
@@ -102,15 +102,15 @@ ENV NGINX_VERSION=$NGINX_VERSION
102
102
ADD nginx-$NGINX_VERSION.tar.gz /tmp/
103
103
104
104
WORKDIR /tmp
105
- RUN wget https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.gz && tar xzvf pcre- 8.44.tar.gz
106
- RUN wget https://www.zlib.net/zlib-1.2.11 .tar.gz && tar xzvf zlib- 1.2.11 .tar.gz
107
- RUN CONFIG_OPTS="--with-pcre=../pcre-8.44 --with-zlib=../zlib-1.2.11 " ./configure && make
105
+ RUN wget https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.gz && mkdir -p pcre && tar -xz -C pcre -f pcre- 8.44.tar.gz --strip-components=1
106
+ RUN wget https://www.zlib.net/zlib-1.2.12 .tar.gz && mkdir -p zlib && tar -xz -C zlib -f zlib- 1.2.12 .tar.gz --strip-components=1
107
+ RUN CONFIG_OPTS="--with-pcre=../pcre --with-zlib=../zlib" ./configure && make
108
108
109
109
# #####
110
- FROM amazonlinux:1 as amzn -builder
110
+ FROM debian:bullseye as debian11 -builder
111
111
112
- RUN yum install -y \
113
- gcc pcre-devel zlib-devel make
112
+ RUN apt update && apt install -y \
113
+ wget build-essential git tree software-properties-common dirmngr apt-transport-https ufw
114
114
115
115
COPY configure /tmp
116
116
COPY config /tmp
@@ -121,7 +121,9 @@ ENV NGINX_VERSION=$NGINX_VERSION
121
121
ADD nginx-$NGINX_VERSION.tar.gz /tmp/
122
122
123
123
WORKDIR /tmp
124
- RUN ./configure && make
124
+ RUN wget https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.gz && mkdir -p pcre && tar -xz -C pcre -f pcre-8.44.tar.gz --strip-components=1
125
+ RUN wget https://www.zlib.net/zlib-1.2.12.tar.gz && mkdir -p zlib && tar -xz -C zlib -f zlib-1.2.12.tar.gz --strip-components=1
126
+ RUN CONFIG_OPTS="--with-pcre=../pcre --with-zlib=../zlib" ./configure && make
125
127
126
128
# #####
127
129
FROM amazonlinux:2 as amzn2-builder
@@ -165,11 +167,11 @@ ARG NGINX_VERSION
165
167
ENV NGINX_VERSION=$NGINX_VERSION
166
168
COPY --from=ubuntu18-builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phantom_token_module.so /build/ubuntu.18.04.ngx_curity_http_phantom_token_module_$NGINX_VERSION.so
167
169
COPY --from=ubuntu20-builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phantom_token_module.so /build/ubuntu.20.04.ngx_curity_http_phantom_token_module_$NGINX_VERSION.so
170
+ COPY --from=ubuntu22-builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phantom_token_module.so /build/ubuntu.22.04.ngx_curity_http_phantom_token_module_$NGINX_VERSION.so
168
171
COPY --from=centos7-builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phantom_token_module.so /build/centos.7.ngx_curity_http_phantom_token_module_$NGINX_VERSION.so
169
- COPY --from=centos8-builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phantom_token_module.so /build/centos.8.ngx_curity_http_phantom_token_module_$NGINX_VERSION.so
170
- COPY --from=debian9-builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phantom_token_module.so /build/debian.stretch.ngx_curity_http_phantom_token_module_$NGINX_VERSION.so
172
+ COPY --from=centos-stream9-builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phantom_token_module.so /build/centos.stream.9.ngx_curity_http_phantom_token_module_$NGINX_VERSION.so
171
173
COPY --from=debian10-builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phantom_token_module.so /build/debian.buster.ngx_curity_http_phantom_token_module_$NGINX_VERSION.so
172
- COPY --from=amzn -builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phantom_token_module.so /build/amzn .ngx_curity_http_phantom_token_module_$NGINX_VERSION.so
174
+ COPY --from=debian11 -builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phantom_token_module.so /build/debian.bullseye .ngx_curity_http_phantom_token_module_$NGINX_VERSION.so
173
175
COPY --from=amzn2-builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phantom_token_module.so /build/amzn2.ngx_curity_http_phantom_token_module_$NGINX_VERSION.so
174
176
COPY --from=alpine-builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phantom_token_module.so /build/alpine.ngx_curity_http_phantom_token_module_$NGINX_VERSION.so
175
177
0 commit comments