diff --git a/otobo.nginx.dockerfile b/otobo.nginx.dockerfile index 0003ac33f6..677b814f1f 100644 --- a/otobo.nginx.dockerfile +++ b/otobo.nginx.dockerfile @@ -9,10 +9,9 @@ # I have found no better way than to first compile NGINX in a BUILDER container and then copy the # finished ngx_http_auth_spnego_module.so into the NGINX container. # If anyone knows a nicer way, please share. - +# # builder-for-kerberos used to create a dynamic spnego auth module # https://gist.github.com/hermanbanken/96f0ff298c162a522ddbba44cad31081 - FROM nginx:mainline AS builder-for-kerberos ENV SPNEGO_AUTH_COMMIT_ID=v1.1.1 @@ -28,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}" && \ @@ -113,7 +111,7 @@ FROM base AS otobo-nginx # Actually there are two config templates in the directory 'templates'. One for plain Nginx and one for Nginx with # Kerberos support. The not needed template is moved out of the way. -RUN mv templates/otobo_nginx.conf.template templates/otobo_nginx.conf.template.hidden +RUN mv templates/otobo_nginx-kerberos.conf.template templates/otobo_nginx-kerberos.conf.template.hidden LABEL org.opencontainers.image.title='OTOBO nginx'