@@ -4,38 +4,44 @@ ARG SOURCE_HASH
4
4
5
5
FROM debian:bullseye-slim as ngx_http_auth_jwt_builder_base
6
6
LABEL 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
+ `
11
11
FROM ngx_http_auth_jwt_builder_base as ngx_http_auth_jwt_builder_module
12
12
LABEL stage=ngx_http_auth_jwt_builder
13
13
ENV LD_LIBRARY_PATH=/usr/local/lib
14
14
ARG 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
+ `
18
19
WORKDIR /root/build/ngx-http-auth-jwt-module
19
20
ARG SOURCE_HASH
20
21
RUN echo "Source Hash: ${SOURCE_HASH}"
21
22
ADD config ./
22
23
ADD src/*.h src/*.c ./src/
23
24
WORKDIR /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
+ `
28
30
WORKDIR /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
+ `
31
35
32
36
33
37
FROM nginx:${NGINX_VERSION} AS ngx_http_auth_jwt_builder_nginx
34
38
LABEL stage=
35
39
RUN 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
+ `
40
46
LABEL maintainer=
"TeslaGov" email=
"[email protected] "
41
47
COPY --from=ngx_http_auth_jwt_builder_module /root/build/nginx/objs/ngx_http_auth_jwt_module.so /usr/lib64/nginx/modules/
0 commit comments