@@ -18,11 +18,24 @@ RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.n
18
18
# for compiling for epel7
19
19
RUN yum -y install libxml2 libxslt libxml2-devel libxslt-devel gd gd-devel perl-ExtUtils-Embed geoip geoip-devel google-perftools google-perftools-devel
20
20
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
+
21
34
RUN mkdir -p /root/dl
22
35
WORKDIR /root/dl
23
36
24
37
# build jansson
25
- ARG JANSSON_VERSION=2.10
38
+ ARG JANSSON_VERSION=2.13.1
26
39
RUN wget https://github.com/akheron/jansson/archive/v$JANSSON_VERSION.zip && \
27
40
unzip v$JANSSON_VERSION.zip && \
28
41
rm v$JANSSON_VERSION.zip && \
@@ -34,7 +47,7 @@ RUN wget https://github.com/akheron/jansson/archive/v$JANSSON_VERSION.zip && \
34
47
make install
35
48
36
49
# build libjwt
37
- ARG LIBJWT_VERSION=1.9 .0
50
+ ARG LIBJWT_VERSION=1.11 .0
38
51
RUN wget https://github.com/benmcollins/libjwt/archive/v$LIBJWT_VERSION.zip && \
39
52
unzip v$LIBJWT_VERSION.zip && \
40
53
rm v$LIBJWT_VERSION.zip && \
@@ -58,8 +71,13 @@ ADD . /root/dl/ngx-http-auth-jwt-module
58
71
# rh-nginx110 uses these config flags
59
72
# ./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'
60
73
#
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
+
63
81
#
64
82
# RUN wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz && \
65
83
# tar -xzf nginx-$NGINX_VERSION.tar.gz && \
@@ -77,64 +95,17 @@ RUN wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz && \
77
95
rm nginx-$NGINX_VERSION.tar.gz && \
78
96
ln -sf nginx-$NGINX_VERSION nginx && \
79
97
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' && \
128
99
make modules && \
129
100
cp /root/dl/nginx/objs/ngx_http_auth_jwt_module.so /usr/lib64/nginx/modules/. && \
130
101
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/ .
132
103
133
104
# Get nginx ready to run
134
105
COPY resources/nginx.conf /etc/nginx/nginx.conf
135
106
COPY resources/test-jwt-nginx.conf /etc/nginx/conf.d/test-jwt-nginx.conf
136
107
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
138
109
RUN cp -r /usr/share/nginx/html /usr/share/nginx/secure
139
110
RUN cp -r /usr/share/nginx/html /usr/share/nginx/secure-rs256
140
111
RUN cp -r /usr/share/nginx/html /usr/share/nginx/secure-auth-header
0 commit comments