91 lines
2.8 KiB
Docker
91 lines
2.8 KiB
Docker
FROM alpine:3.18
|
|
LABEL maintainer.name="Uwe Hermann"\
|
|
maintainer.email="uh@uleenucks.de"
|
|
|
|
|
|
#COPY rootfs /
|
|
|
|
ENV NGINX_VERSION=1.21.4
|
|
|
|
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community/" >> /etc/apk/repositories \
|
|
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories \
|
|
&& set -ex \
|
|
&& apk -U upgrade --no-cache --no-progress \
|
|
&& apk add --no-cache --no-progress \
|
|
ca-certificates \
|
|
libressl \
|
|
pcre \
|
|
zlib \
|
|
su-exec \
|
|
&& apk add --no-progress --no-cache --virtual .build-deps \
|
|
build-base \
|
|
linux-headers \
|
|
libressl-dev \
|
|
pcre-dev \
|
|
wget \
|
|
zlib-dev \
|
|
&& cd /tmp \
|
|
&& wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz \
|
|
&& tar xzf nginx-${NGINX_VERSION}.tar.gz \
|
|
&& cd /tmp/nginx-${NGINX_VERSION} \
|
|
&& wget -q https://github.com/nginx-modules/ngx_http_tls_dyn_size/raw/master/nginx__dynamic_tls_records_1.15.5%2B.patch -O dynamic_records.patch \
|
|
&& patch -p1 < dynamic_records.patch \
|
|
&& ./configure \
|
|
--prefix=/etc/nginx \
|
|
--sbin-path=/usr/sbin/nginx \
|
|
--conf-path=/etc/nginx/nginx.conf \
|
|
--error-log-path=/var/log/nginx/error.log \
|
|
--http-log-path=/var/log/nginx/access.log \
|
|
--pid-path=/tmp/nginx.pid \
|
|
--lock-path=/tmp/nginx.lock \
|
|
--http-client-body-temp-path=/var/cache/nginx/client_temp \
|
|
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \
|
|
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
|
|
--with-http_ssl_module \
|
|
--with-http_v2_module \
|
|
--with-http_gzip_static_module \
|
|
--with-http_stub_status_module \
|
|
--with-file-aio \
|
|
--with-threads \
|
|
--with-stream \
|
|
--with-stream_ssl_module \
|
|
--with-pcre-jit \
|
|
--with-http_realip_module \
|
|
--with-http_addition_module \
|
|
--with-http_sub_module \
|
|
--with-http_dav_module \
|
|
--with-http_flv_module \
|
|
--with-http_mp4_module \
|
|
--with-http_gunzip_module \
|
|
--with-http_random_index_module \
|
|
--with-http_secure_link_module \
|
|
--with-http_auth_request_module \
|
|
--with-http_slice_module \
|
|
--with-mail \
|
|
--with-mail_ssl_module \
|
|
--with-stream_realip_module \
|
|
--without-http_ssi_module \
|
|
--without-http_scgi_module \
|
|
--without-http_uwsgi_module \
|
|
--without-http_geo_module \
|
|
--without-http_autoindex_module \
|
|
--without-http_split_clients_module \
|
|
--without-http_memcached_module \
|
|
--without-http_empty_gif_module \
|
|
--without-http_browser_module \
|
|
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
|
&& make install \
|
|
&& mkdir -p /var/cache/nginx \
|
|
&& strip -s /usr/sbin/nginx \
|
|
&& apk del .build-deps \
|
|
&& rm -rf /tmp/* /var/cache/apk/*
|
|
|
|
EXPOSE 8000 4430
|
|
|
|
COPY rootfs /
|
|
RUN chmod +x /usr/local/bin/run.sh
|
|
|
|
VOLUME /sites-enabled /conf.d /www /passwds /certs /var/log/nginx
|
|
|
|
CMD [ "run.sh" ]
|