@@ -4,38 +4,44 @@ ARG SOURCE_HASH
44
55FROM debian:bullseye-slim as ngx_http_auth_jwt_builder_base
66LABEL stage=ngx_http_auth_jwt_builder
7- RUN apt-get update &&\
8- apt-get install -y curl build-essential
9-
10-
7+ RUN <<`
8+ apt-get update
9+ apt-get install -y curl build-essential
10+ `
1111FROM ngx_http_auth_jwt_builder_base as ngx_http_auth_jwt_builder_module
1212LABEL stage=ngx_http_auth_jwt_builder
1313ENV LD_LIBRARY_PATH=/usr/local/lib
1414ARG NGINX_VERSION
15- RUN set -x &&\
16- apt-get install -y libjwt-dev libjwt0 libjansson-dev libjansson4 libpcre2-dev zlib1g-dev libpcre3-dev &&\
17- mkdir -p /root/build/ngx-http-auth-jwt-module
15+ RUN <<`
16+ apt-get install -y libjwt-dev libjwt0 libjansson-dev libjansson4 libpcre2-dev zlib1g-dev libpcre3-dev
17+ mkdir -p /root/build/ngx-http-auth-jwt-module
18+ `
1819WORKDIR /root/build/ngx-http-auth-jwt-module
1920ARG SOURCE_HASH
2021RUN echo "Source Hash: ${SOURCE_HASH}"
2122ADD config ./
2223ADD src/*.h src/*.c ./src/
2324WORKDIR /root/build
24- RUN set -x &&\
25- mkdir nginx &&\
26- curl -O http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz &&\
27- tar -xzf nginx-${NGINX_VERSION}.tar.gz --strip-components 1 -C nginx
25+ RUN <<`
26+ mkdir nginx
27+ curl -O http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
28+ tar -xzf nginx-${NGINX_VERSION}.tar.gz --strip-components 1 -C nginx
29+ `
2830WORKDIR /root/build/nginx
29- RUN ./configure --with-debug --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module &&\
30- make modules
31+ RUN <<`
32+ ./configure --with-debug --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module
33+ make modules
34+ `
3135
3236
3337FROM nginx:${NGINX_VERSION} AS ngx_http_auth_jwt_builder_nginx
3438LABEL stage=
3539RUN rm /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh /etc/nginx/conf.d/default.conf
36- RUN apt-get update &&\
37- apt-get -y install libjansson4 libjwt0 &&\
38- cd /etc/nginx &&\
39- sed -ri '/pid\s +\/ var\/ run\/ nginx\. pid;$/a load_module \/ usr\/ lib64\/ nginx\/ modules\/ ngx_http_auth_jwt_module\. so;' nginx.conf
40+ RUN <<`
41+ apt-get update
42+ apt-get -y install libjansson4 libjwt0
43+ cd /etc/nginx
44+ sed -ri '/pid\s +\/ var\/ run\/ nginx\. pid;$/a load_module \/ usr\/ lib64\/ nginx\/ modules\/ ngx_http_auth_jwt_module\. so;' nginx.conf
45+ `
4046LABEL maintainer=
"TeslaGov" email=
"[email protected] " 4147COPY --from=ngx_http_auth_jwt_builder_module /root/build/nginx/objs/ngx_http_auth_jwt_module.so /usr/lib64/nginx/modules/
0 commit comments