@@ -30,8 +30,8 @@ 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 && 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.13. tar.gz && mkdir -p zlib && tar -xz -C zlib -f zlib-1.2.13 .tar.gz --strip-components=1
33+ RUN wget https://sourceforge.net/projects/pcre/files/pcre/8.45 /pcre-8.45 .tar.gz && mkdir -p pcre && tar -xz -C pcre -f pcre-8.45 .tar.gz --strip-components=1
34+ RUN wget https://www.zlib.net/zlib-1.3. tar.gz && mkdir -p zlib && tar -xz -C zlib -f zlib-1.3 .tar.gz --strip-components=1
3535RUN CONFIG_OPTS="--with-pcre=../pcre --with-zlib=../zlib" ./configure && make
3636
3737# #####
@@ -49,8 +49,8 @@ ENV NGINX_VERSION=$NGINX_VERSION
4949ADD nginx-$NGINX_VERSION.tar.gz /tmp/
5050
5151WORKDIR /tmp
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.13. tar.gz && mkdir -p zlib && tar -xz -C zlib -f zlib-1.2.13 .tar.gz --strip-components=1
52+ RUN wget https://sourceforge.net/projects/pcre/files/pcre/8.45 /pcre-8.45 .tar.gz && mkdir -p pcre && tar -xz -C pcre -f pcre-8.45 .tar.gz --strip-components=1
53+ RUN wget https://www.zlib.net/zlib-1.3. tar.gz && mkdir -p zlib && tar -xz -C zlib -f zlib-1.3 .tar.gz --strip-components=1
5454RUN CONFIG_OPTS="--with-pcre=../pcre --with-zlib=../zlib" ./configure && make
5555
5656# #####
@@ -102,8 +102,8 @@ 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 && 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.13. tar.gz && mkdir -p zlib && tar -xz -C zlib -f zlib-1.2.13 .tar.gz --strip-components=1
105+ RUN wget https://sourceforge.net/projects/pcre/files/pcre/8.45 /pcre-8.45 .tar.gz && mkdir -p pcre && tar -xz -C pcre -f pcre-8.45 .tar.gz --strip-components=1
106+ RUN wget https://www.zlib.net/zlib-1.3. tar.gz && mkdir -p zlib && tar -xz -C zlib -f zlib-1.3 .tar.gz --strip-components=1
107107RUN CONFIG_OPTS="--with-pcre=../pcre --with-zlib=../zlib" ./configure && make
108108
109109# #####
@@ -121,8 +121,27 @@ ENV NGINX_VERSION=$NGINX_VERSION
121121ADD nginx-$NGINX_VERSION.tar.gz /tmp/
122122
123123WORKDIR /tmp
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.13.tar.gz && mkdir -p zlib && tar -xz -C zlib -f zlib-1.2.13.tar.gz --strip-components=1
124+ RUN wget https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz && mkdir -p pcre && tar -xz -C pcre -f pcre-8.45.tar.gz --strip-components=1
125+ RUN wget https://www.zlib.net/zlib-1.3.tar.gz && mkdir -p zlib && tar -xz -C zlib -f zlib-1.3.tar.gz --strip-components=1
126+ RUN CONFIG_OPTS="--with-pcre=../pcre --with-zlib=../zlib" ./configure && make
127+
128+ # #####
129+ FROM debian:bookworm as debian12-builder
130+
131+ RUN apt update && apt install -y \
132+ wget build-essential git tree software-properties-common dirmngr apt-transport-https ufw
133+
134+ COPY configure /tmp
135+ COPY config /tmp
136+ COPY Makefile /tmp
137+ COPY phantom_token.c /tmp
138+ ARG NGINX_VERSION
139+ ENV NGINX_VERSION=$NGINX_VERSION
140+ ADD nginx-$NGINX_VERSION.tar.gz /tmp/
141+
142+ WORKDIR /tmp
143+ RUN wget https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz && mkdir -p pcre && tar -xz -C pcre -f pcre-8.45.tar.gz --strip-components=1
144+ RUN wget https://www.zlib.net/zlib-1.3.tar.gz && mkdir -p zlib && tar -xz -C zlib -f zlib-1.3.tar.gz --strip-components=1
126145RUN CONFIG_OPTS="--with-pcre=../pcre --with-zlib=../zlib" ./configure && make
127146
128147# #####
@@ -142,6 +161,23 @@ ADD nginx-$NGINX_VERSION.tar.gz /tmp/
142161WORKDIR /tmp
143162RUN ./configure && make
144163
164+ # #####
165+ FROM amazonlinux:2023 as amzn2023-builder
166+
167+ RUN yum install -y \
168+ gcc pcre-devel zlib-devel make
169+
170+ COPY configure /tmp
171+ COPY config /tmp
172+ COPY Makefile /tmp
173+ COPY phantom_token.c /tmp
174+ ARG NGINX_VERSION
175+ ENV NGINX_VERSION=$NGINX_VERSION
176+ ADD nginx-$NGINX_VERSION.tar.gz /tmp/
177+
178+ WORKDIR /tmp
179+ RUN ./configure && make
180+
145181# #####
146182FROM alpine as alpine-builder
147183
@@ -172,7 +208,9 @@ COPY --from=centos7-builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phant
172208COPY --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
173209COPY --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
174210COPY --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
211+ COPY --from=debian12-builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phantom_token_module.so /build/debian.bookworm.ngx_curity_http_phantom_token_module_$NGINX_VERSION.so
175212COPY --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
213+ COPY --from=amzn2023-builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phantom_token_module.so /build/amzn2023.ngx_curity_http_phantom_token_module_$NGINX_VERSION.so
176214COPY --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
177215
178216ENTRYPOINT ["sleep" ]
0 commit comments