Skip to content

Commit

Permalink
Issue #2241: use the WORKDIR directive
Browse files Browse the repository at this point in the history
instead of an explicit 'cd' in the RUN declarations.
  • Loading branch information
bschmalhofer committed Jul 26, 2023
1 parent 46241fa commit 59930a1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions otobo.nginx.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ RUN apt-get update\
libkrb5-dev \
wget

WORKDIR /usr/src
RUN set -x && \
cd /usr/src \
NGINX_VERSION="$( nginx -v 2>&1 | awk -F/ '{print $2}' )" && \
NGINX_CONFIG="$( nginx -V 2>&1 | sed -n -e 's/^.*arguments: //p' )" && \
wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
wget https://github.com/stnoonan/spnego-http-auth-nginx-module/archive/${SPNEGO_AUTH_COMMIT_ID}.tar.gz -O spnego-http-auth.tar.gz

RUN cd /usr/src && \
NGINX_CONFIG="$( nginx -V 2>&1 | sed -n -e 's/^.*arguments: //p' )" && \
RUN NGINX_CONFIG="$( nginx -V 2>&1 | sed -n -e 's/^.*arguments: //p' )" && \
tar -xzC /usr/src -f nginx.tar.gz && \
tar -xzvf spnego-http-auth.tar.gz && \
SPNEGO_AUTH_DIR="$( pwd )/spnego-http-auth-nginx-module-${SPNEGO_AUTH_COMMIT_ID_FILE}" && \
Expand Down

0 comments on commit 59930a1

Please sign in to comment.