Skip to content

Commit

Permalink
Merge pull request #28 from theplant/sec-2557
Browse files Browse the repository at this point in the history
update nginx image
  • Loading branch information
bohrasd authored Nov 15, 2023
2 parents 315d0e5 + f15bbd2 commit 1b2c5c1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Base.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:1.25.0 as builder
FROM nginx:1.25.3 as builder
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y build-essential dh-autoreconf unzip wget libpcre3 libpcre3-dev zlib1g zlib1g.dev libssl-dev && \
Expand All @@ -16,18 +16,18 @@ RUN mkdir /nginx-dev && \
&& cd /nginx-dev \
&& wget https://github.com/ip2location/ip2location-nginx/archive/master.zip \
&& unzip master.zip && rm master.zip \
&& wget http://nginx.org/download/nginx-1.25.0.tar.gz \
&& wget http://nginx.org/download/nginx-1.25.3.tar.gz \
&& tar xvfz nginx-*.tar.gz && rm nginx-*.tar.gz
RUN nginx -V 2> $$ \
&& nginx_configure_arguments="`cat $$ | grep 'configure arguments:' | awk -F: '{print $2}'` --add-module=/nginx-dev/ip2location-nginx-master" \
&& rm -rf $$ \
&& cd /nginx-dev/nginx-1.25.0 \
&& cd /nginx-dev/nginx-1.25.3 \
&& eval ./configure $nginx_configure_arguments \
&& make

FROM nginx:1.25.0
RUN apt-get update -y && apt-get upgrade -y
FROM nginx:1.25.3
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y libpcre3 && apt-get clean
ENV LD_LIBRARY_PATH /usr/local/lib
COPY --from=builder /usr/local/lib /usr/local/lib
COPY --from=builder /nginx-dev/nginx-1.25.0/objs/nginx /usr/sbin/nginx
COPY --from=builder /nginx-dev/nginx-1.25.3/objs/nginx /usr/sbin/nginx
CMD ["nginx", "-g", "daemon off;"]

0 comments on commit 1b2c5c1

Please sign in to comment.