From e9b7cef83876f341180c74ccffa8067ade9aee3f Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Thu, 13 May 2021 15:24:17 +0000 Subject: [PATCH] build openresty --- Dockerfile | 52 +++++++++++++++++++++++++++++++++++++++++++++++++--- build | 4 ++++ 2 files changed, 53 insertions(+), 3 deletions(-) create mode 100755 build diff --git a/Dockerfile b/Dockerfile index 5c255db..bdfd413 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,14 +9,45 @@ RUN apt-get update && apt-get -y upgrade \ # Install all required packages RUN apt-get update && \ - apt-get -y install \ + apt-get install -y \ + build-essential \ wget \ curl \ unzip \ gzip \ && rm -rf /var/lib/apt/lists/* - +ARG RESTY_CONFIG_OPTIONS="\ + --with-compat \ + --with-file-aio \ + --with-http_addition_module \ + --with-http_auth_request_module \ + --with-http_dav_module \ + --with-http_flv_module \ + --with-http_geoip_module=dynamic \ + --with-http_gunzip_module \ + --with-http_gzip_static_module \ + --with-http_image_filter_module=dynamic \ + --with-http_mp4_module \ + --with-http_random_index_module \ + --with-http_realip_module \ + --with-http_secure_link_module \ + --with-http_slice_module \ + --with-http_ssl_module \ + --with-http_stub_status_module \ + --with-http_sub_module \ + --with-http_v2_module \ + --with-http_xslt_module=dynamic \ + --with-ipv6 \ + --with-mail \ + --with-mail_ssl_module \ + --with-md5-asm \ + --with-pcre-jit \ + --with-sha1-asm \ + --with-stream \ + --with-stream_ssl_module \ + --with-threads \ + " WORKDIR /tmp # Get the openresty /nginx source RUN cd /tmp @@ -27,4 +58,19 @@ RUN wget https://openresty.org/download/openresty-1.19.3.1.tar.gz -O openresty.t && tar xvf openresty.tar.gz && mv openresty-1.19.3.1 openresty RUN ls RUN wget https://github.com/kvspb/nginx-auth-ldap/archive/refs/heads/master.zip && unzip -o master.zip && rm master.zip -RUN cd openresty && ./configure \ No newline at end of file +RUN apt-get update && \ + apt-get install -y libpcre3-dev \ + libssl-dev zlib1g-dev libxslt-dev \ + libgd-dev libgeoip-dev \ + && rm -rf /var/lib/apt/lists/* + +RUN cd openresty && \ + ./configure ${RESTY_CONFIG_OPTIONS} \ + && make && make install +RUN ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \ + && ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log + +RUN apt-get update && \ + apt-get install -y procps \ + && rm -rf /var/lib/apt/lists/* +CMD ["/usr/local/openresty/bin/openresty", "-g" ,"daemon off;"]; \ No newline at end of file diff --git a/build b/build new file mode 100755 index 0000000..6918205 --- /dev/null +++ b/build @@ -0,0 +1,4 @@ +#!/bin/bash +docker login docker.triton2.fet.at +docker build -t docker.triton2.fet.at/openrestyfet . +docker push docker.triton2.fet.at/openrestyfet \ No newline at end of file