Skip to content

Commit 820b1a4

Browse files
committed
Update for EPEL7 nginx 1.16.1, updated jansson, updated libjwt
1 parent f6e8452 commit 820b1a4

File tree

1 file changed

+25
-54
lines changed

1 file changed

+25
-54
lines changed

Dockerfile

Lines changed: 25 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,24 @@ RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.n
1818
# for compiling for epel7
1919
RUN yum -y install libxml2 libxslt libxml2-devel libxslt-devel gd gd-devel perl-ExtUtils-Embed geoip geoip-devel google-perftools google-perftools-devel
2020

21+
# Jansson update requires new cmake
22+
RUN yum -y install cmake3 && \
23+
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake 10 \
24+
--slave /usr/local/bin/ctest ctest /usr/bin/ctest \
25+
--slave /usr/local/bin/cpack cpack /usr/bin/cpack \
26+
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake \
27+
--family cmake && \
28+
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
29+
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
30+
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
31+
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
32+
--family cmake
33+
2134
RUN mkdir -p /root/dl
2235
WORKDIR /root/dl
2336

2437
# build jansson
25-
ARG JANSSON_VERSION=2.10
38+
ARG JANSSON_VERSION=2.13.1
2639
RUN wget https://github.com/akheron/jansson/archive/v$JANSSON_VERSION.zip && \
2740
unzip v$JANSSON_VERSION.zip && \
2841
rm v$JANSSON_VERSION.zip && \
@@ -34,7 +47,7 @@ RUN wget https://github.com/akheron/jansson/archive/v$JANSSON_VERSION.zip && \
3447
make install
3548

3649
# build libjwt
37-
ARG LIBJWT_VERSION=1.9.0
50+
ARG LIBJWT_VERSION=1.11.0
3851
RUN wget https://github.com/benmcollins/libjwt/archive/v$LIBJWT_VERSION.zip && \
3952
unzip v$LIBJWT_VERSION.zip && \
4053
rm v$LIBJWT_VERSION.zip && \
@@ -58,8 +71,13 @@ ADD . /root/dl/ngx-http-auth-jwt-module
5871
# rh-nginx110 uses these config flags
5972
# ./configure --add-dynamic-module=../ngx-http-auth-jwt-module --prefix=/opt/rh/rh-nginx110/root/usr/share/nginx --sbin-path=/opt/rh/rh-nginx110/root/usr/sbin/nginx --modules-path=/opt/rh/rh-nginx110/root/usr/lib64/nginx/modules --conf-path=/etc/opt/rh/rh-nginx110/nginx/nginx.conf --error-log-path=/var/opt/rh/rh-nginx110/log/nginx/error.log --http-log-path=/var/opt/rh/rh-nginx110/log/nginx/access.log --http-client-body-temp-path=/var/opt/rh/rh-nginx110/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/opt/rh/rh-nginx110/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/opt/rh/rh-nginx110/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/opt/rh/rh-nginx110/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/opt/rh/rh-nginx110/lib/nginx/tmp/scgi --pid-path=/var/opt/rh/rh-nginx110/run/nginx/nginx.pid --lock-path=/var/opt/rh/rh-nginx110/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=c99' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'
6073
#
61-
# epel7 version uses these config flags
62-
# ./configure --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-google_perftools_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=gnu99' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'
74+
# epel7 version 1.12.1 uses these config flags
75+
# ./configure --add-dynamic-module=../ngx-http-auth-jwt-module --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-google_perftools_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=gnu99' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'
76+
77+
#
78+
# epel7 version 1.16.1 uses these config flags
79+
# ./configure --add-dynamic-module=../ngx-http-auth-jwt-module --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-stream_ssl_preread_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-http_auth_request_module --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-google_perftools_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'
80+
6381
#
6482
#RUN wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz && \
6583
# tar -xzf nginx-$NGINX_VERSION.tar.gz && \
@@ -77,64 +95,17 @@ RUN wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz && \
7795
rm nginx-$NGINX_VERSION.tar.gz && \
7896
ln -sf nginx-$NGINX_VERSION nginx && \
7997
cd /root/dl/nginx && \
80-
./configure \
81-
--add-dynamic-module=../ngx-http-auth-jwt-module \
82-
--prefix=/usr/share/nginx \
83-
--sbin-path=/usr/sbin/nginx \
84-
--modules-path=/usr/lib64/nginx/modules \
85-
--conf-path=/etc/nginx/nginx.conf \
86-
--error-log-path=/var/log/nginx/error.log \
87-
--http-log-path=/var/log/nginx/access.log \
88-
--http-client-body-temp-path=/var/lib/nginx/tmp/client_body \
89-
--http-proxy-temp-path=/var/lib/nginx/tmp/proxy \
90-
--http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi \
91-
--http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi \
92-
--http-scgi-temp-path=/var/lib/nginx/tmp/scgi \
93-
--pid-path=/run/nginx.pid \
94-
--lock-path=/run/lock/subsys/nginx \
95-
--user=nginx \
96-
--group=nginx \
97-
--with-file-aio \
98-
--with-ipv6 \
99-
--with-http_ssl_module \
100-
--with-http_v2_module \
101-
--with-http_realip_module \
102-
--with-http_addition_module \
103-
--with-http_xslt_module=dynamic \
104-
--with-http_image_filter_module=dynamic \
105-
--with-http_geoip_module=dynamic \
106-
--with-http_sub_module \
107-
--with-http_dav_module \
108-
--with-http_flv_module \
109-
--with-http_mp4_module \
110-
--with-http_gunzip_module \
111-
--with-http_gzip_static_module \
112-
--with-http_random_index_module \
113-
--with-http_secure_link_module \
114-
--with-http_degradation_module \
115-
--with-http_slice_module \
116-
--with-http_stub_status_module \
117-
--with-http_perl_module=dynamic \
118-
--with-mail=dynamic \
119-
--with-mail_ssl_module \
120-
--with-pcre \
121-
--with-pcre-jit \
122-
--with-stream=dynamic \
123-
--with-stream_ssl_module \
124-
--with-google_perftools_module \
125-
--with-debug \
126-
--with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=gnu99' \
127-
--with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E' && \
98+
./configure --add-dynamic-module=../ngx-http-auth-jwt-module --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-stream_ssl_preread_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-http_auth_request_module --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-google_perftools_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -std=gnu99' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E' && \
12899
make modules && \
129100
cp /root/dl/nginx/objs/ngx_http_auth_jwt_module.so /usr/lib64/nginx/modules/. && \
130101
mkdir /build && \
131-
cp /root/dl/nginx/objs/ngx_http_auth_jwt_module.so /build.
102+
cp /root/dl/nginx/objs/ngx_http_auth_jwt_module.so /build/.
132103

133104
# Get nginx ready to run
134105
COPY resources/nginx.conf /etc/nginx/nginx.conf
135106
COPY resources/test-jwt-nginx.conf /etc/nginx/conf.d/test-jwt-nginx.conf
136107
RUN rm -rf /usr/share/nginx/html
137-
RUN cp -r /root/dl/nginx-1.16.1/html /usr/share/nginx
108+
RUN cp -r /root/dl/nginx/html /usr/share/nginx
138109
RUN cp -r /usr/share/nginx/html /usr/share/nginx/secure
139110
RUN cp -r /usr/share/nginx/html /usr/share/nginx/secure-rs256
140111
RUN cp -r /usr/share/nginx/html /usr/share/nginx/secure-auth-header

0 commit comments

Comments
 (0)