Skip to content

Commit f44e4bd

Browse files
authored
Merge pull request #72 from curityio/feature/nginx_r30_update
NGINX version updates
2 parents 454d047 + fc560c9 commit f44e4bd

File tree

8 files changed

+127
-21
lines changed

8 files changed

+127
-21
lines changed

Dockerfile

+46-8
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ ENV NGINX_VERSION=$NGINX_VERSION
3030
ADD nginx-$NGINX_VERSION.tar.gz /tmp/
3131

3232
WORKDIR /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
3535
RUN CONFIG_OPTS="--with-pcre=../pcre --with-zlib=../zlib" ./configure && make
3636

3737
######
@@ -49,8 +49,8 @@ ENV NGINX_VERSION=$NGINX_VERSION
4949
ADD nginx-$NGINX_VERSION.tar.gz /tmp/
5050

5151
WORKDIR /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
5454
RUN CONFIG_OPTS="--with-pcre=../pcre --with-zlib=../zlib" ./configure && make
5555

5656
######
@@ -102,8 +102,8 @@ ENV NGINX_VERSION=$NGINX_VERSION
102102
ADD nginx-$NGINX_VERSION.tar.gz /tmp/
103103

104104
WORKDIR /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
107107
RUN CONFIG_OPTS="--with-pcre=../pcre --with-zlib=../zlib" ./configure && make
108108

109109
######
@@ -121,8 +121,27 @@ ENV NGINX_VERSION=$NGINX_VERSION
121121
ADD nginx-$NGINX_VERSION.tar.gz /tmp/
122122

123123
WORKDIR /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
126145
RUN CONFIG_OPTS="--with-pcre=../pcre --with-zlib=../zlib" ./configure && make
127146

128147
######
@@ -142,6 +161,23 @@ ADD nginx-$NGINX_VERSION.tar.gz /tmp/
142161
WORKDIR /tmp
143162
RUN ./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
######
146182
FROM alpine as alpine-builder
147183

@@ -172,7 +208,9 @@ COPY --from=centos7-builder /tmp/nginx-$NGINX_VERSION/objs/ngx_curity_http_phant
172208
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
173209
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
174210
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
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
175212
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
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
176214
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
177215

178216
ENTRYPOINT ["sleep"]

0 commit comments

Comments
 (0)