From 14ce3e887cafebb191b7235db6144020115af509 Mon Sep 17 00:00:00 2001 From: Lee Date: Mon, 26 Feb 2024 17:52:32 +0000 Subject: [PATCH] make nginx build silently --- Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5a55c07..af6b503 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,12 +7,14 @@ RUN apk update && apk upgrade && \ # Download and build the latest version of Nginx from source WORKDIR /tmp -RUN wget https://nginx.org/download/nginx-1.25.3.tar.gz -RUN tar -xzvf nginx-1.25.3.tar.gz -WORKDIR /tmp/nginx-1.25.3 -RUN ./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/sbin/nginx --conf-path=/etc/nginx/nginx.conf -RUN make -RUN make install +RUN wget https://nginx.org/download/nginx-1.25.3.tar.gz && \ + tar -xzvf nginx-1.25.3.tar.gz && \ + cd nginx-1.25.3 && \ + ./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/sbin/nginx --conf-path=/etc/nginx/nginx.conf && \ + make > /dev/null 2>&1 && \ + make install > /dev/null 2>&1 && \ + make_status=$? && \ + if [ $make_status -ne 0 ]; then echo "Nginx build failed"; exit $make_status; fi # Cleanup unnecessary files RUN rm -rf /tmp/*