Skip to content

Commit 4e35980

Browse files
committed
reducing what has to rebuild
1 parent 9c4db29 commit 4e35980

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

Dockerfile

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,14 @@ RUN yum -y update && \
1313
yum -y install pcre-devel pcre zlib-devel openssl-devel wget cmake check-devel check && \
1414
yum -y install nginx-$NGINX_VERSION
1515

16-
ARG JANSSON_VERSION=2.10
17-
ARG LIBJWT_VERSION=1.8.0
18-
ARG TESLA_REPO_NAME=ngx-http-auth-jwt-module
19-
2016
# for compiling for rh-nginx110
2117
# yum -y install libxml2 libxslt libxml2-devel libxslt-devel gd gd-devel perl-ExtUtils-Embed
2218

2319
RUN mkdir -p /root/dl
2420
WORKDIR /root/dl
2521

26-
# get our JWT module
27-
# change this to get a specific version?
28-
ADD https://github.com/TeslaGov/$TESLA_REPO_NAME/archive/joefitz/match-rh-nginx110-version.zip .
29-
RUN unzip match-rh-nginx110-version.zip && \
30-
rm match-rh-nginx110-version.zip && \
31-
ln -sf $TESLA_REPO_NAME-joefitz-match-rh-nginx110-version $TESLA_REPO_NAME
32-
3322
# build jansson
23+
ARG JANSSON_VERSION=2.10
3424
RUN wget https://github.com/akheron/jansson/archive/v$JANSSON_VERSION.zip && \
3525
unzip v$JANSSON_VERSION.zip && \
3626
rm v$JANSSON_VERSION.zip && \
@@ -42,6 +32,7 @@ RUN wget https://github.com/akheron/jansson/archive/v$JANSSON_VERSION.zip && \
4232
make install
4333

4434
# build libjwt
35+
ARG LIBJWT_VERSION=1.8.0
4536
RUN wget https://github.com/benmcollins/libjwt/archive/v$LIBJWT_VERSION.zip && \
4637
unzip v$LIBJWT_VERSION.zip && \
4738
rm v$LIBJWT_VERSION.zip && \
@@ -52,6 +43,19 @@ RUN wget https://github.com/benmcollins/libjwt/archive/v$LIBJWT_VERSION.zip && \
5243
make all && \
5344
make install
5445

46+
# get our JWT module
47+
# change this to get a specific version?
48+
ARG TESLA_REPO_NAME=ngx-http-auth-jwt-module
49+
# this value should end with a trailing slash (or be blank)
50+
ARG TESLA_REPO_URL_PREFIX=joefitz/
51+
# this value should end with a trailing dash (or be blank)
52+
ARG TESLA_REPO_FILE_PREFIX=joefitz-
53+
ARG TESLA_REPO_FILENAME=match-rh-nginx110-version
54+
ADD https://github.com/TeslaGov/$TESLA_REPO_NAME/archive/${TESLA_REPO_URL_PREFIX}${TESLA_REPO_FILENAME}.zip .
55+
RUN unzip ${TESLA_REPO_FILENAME}.zip && \
56+
rm ${TESLA_REPO_FILENAME}.zip && \
57+
ln -sf ${TESLA_REPO_NAME}-${TESLA_REPO_FILE_PREFIX}${TESLA_REPO_FILENAME} ${TESLA_REPO_NAME}
58+
5559
# after 1.11.5 use this command
5660
# ./configure --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module --with-cc-opt='-std=gnu99'
5761
# build nginx module against nginx sources

0 commit comments

Comments
 (0)