@@ -30,15 +30,15 @@ ENV NGINX_VERSION=$NGINX_VERSION
3030ADD nginx-$NGINX_VERSION.tar.gz /tmp/
3131
3232WORKDIR /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
3636
3737# #####
38- FROM centos:7 as centos7 -builder
38+ FROM ubuntu:22.04 as ubuntu22 -builder
3939
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
4242
4343COPY configure /tmp
4444COPY config /tmp
@@ -49,10 +49,12 @@ ENV NGINX_VERSION=$NGINX_VERSION
4949ADD nginx-$NGINX_VERSION.tar.gz /tmp/
5050
5151WORKDIR /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
5355
5456# #####
55- FROM quay.io/ centos/centos:stream8 as centos8 -builder
57+ FROM centos:7 as centos7 -builder
5658
5759RUN yum install -y \
5860 gcc pcre-devel zlib-devel make
@@ -69,10 +71,10 @@ WORKDIR /tmp
6971RUN ./configure && make
7072
7173# #####
72- FROM debian:stretch as debian9 -builder
74+ FROM quay.io/centos/centos:stream9 as centos-stream9 -builder
7375
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
7678
7779COPY configure /tmp
7880COPY config /tmp
@@ -83,9 +85,7 @@ ENV NGINX_VERSION=$NGINX_VERSION
8385ADD nginx-$NGINX_VERSION.tar.gz /tmp/
8486
8587WORKDIR /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
8989
9090# #####
9191FROM debian:buster as debian10-builder
@@ -102,15 +102,15 @@ ENV NGINX_VERSION=$NGINX_VERSION
102102ADD nginx-$NGINX_VERSION.tar.gz /tmp/
103103
104104WORKDIR /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
108108
109109# #####
110- FROM amazonlinux:1 as amzn -builder
110+ FROM debian:bullseye as debian11 -builder
111111
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
114114
115115COPY configure /tmp
116116COPY config /tmp
@@ -121,7 +121,9 @@ ENV NGINX_VERSION=$NGINX_VERSION
121121ADD nginx-$NGINX_VERSION.tar.gz /tmp/
122122
123123WORKDIR /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
125127
126128# #####
127129FROM amazonlinux:2 as amzn2-builder
@@ -165,11 +167,11 @@ ARG NGINX_VERSION
165167ENV NGINX_VERSION=$NGINX_VERSION
166168COPY --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
167169COPY --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
168171COPY --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
171173COPY --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
173175COPY --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
174176COPY --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
175177
0 commit comments