Skip to content

Commit 758ff80

Browse files
committed
Use nginx.org yum repo instead of epel
EPEL wasn't carrying the range of versions of NGINX that the official NGINX was carrying, so I changed from EPEL to NGINX. Also, I changed the ./configure to use the "with-compat" option. At the least, it makes the configure command much simpler... and possibly we might be able to use the module without recompiling (not sure).
1 parent 891467e commit 758ff80

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

Dockerfile

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,21 @@ FROM centos:7
33
LABEL maintainer="TeslaGov" email="[email protected]"
44

55
ARG NGINX_VERSION=1.16.1
6-
ARG JANSSON_VERSION=2.10
7-
ARG LIBJWT_VERSION=1.9.0
6+
ARG JANSSON_VERSION=2.13.1
7+
ARG LIBJWT_VERSION=1.12.0
88

99
ENV LD_LIBRARY_PATH=/usr/local/lib
1010
ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/share/pkgconfig
1111

12-
RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
13-
yum -y update && \
12+
RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
13+
RUN echo "" >>/etc/yum.repos.d/nginx.repo
14+
RUN echo "[nginx]" >>/etc/yum.repos.d/nginx.repo
15+
RUN echo "name=nginx repo" >>/etc/yum.repos.d/nginx.repo
16+
RUN echo "baseurl=https://nginx.org/packages/centos/7/x86_64/" >>/etc/yum.repos.d/nginx.repo
17+
RUN echo "gpgcheck=0" >>/etc/yum.repos.d/nginx.repo
18+
RUN echo "enabled=1" >>/etc/yum.repos.d/nginx.repo
19+
20+
RUN yum -y update && \
1421
yum -y groupinstall 'Development Tools' && \
1522
yum -y install pcre-devel pcre zlib-devel openssl-devel wget cmake check-devel check && \
1623
yum -y install nginx-$NGINX_VERSION
@@ -85,7 +92,7 @@ RUN wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz && \
8592
rm nginx-$NGINX_VERSION.tar.gz && \
8693
ln -sf nginx-$NGINX_VERSION nginx && \
8794
cd /root/dl/nginx && \
88-
./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' && \
95+
./configure --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module --with-cc-opt='-std=gnu99' && \
8996
make modules && \
9097
cp /root/dl/nginx/objs/ngx_http_auth_jwt_module.so /usr/lib64/nginx/modules/.
9198

@@ -101,4 +108,4 @@ RUN cp -r /usr/share/nginx/html /usr/share/nginx/secure-no-redirect
101108

102109
ENTRYPOINT ["/usr/sbin/nginx"]
103110

104-
EXPOSE 8000
111+
EXPOSE 8000

0 commit comments

Comments
 (0)