2024-03-05 14:05:35 -05:00
|
|
|
# SPDX-FileCopyrightText: 2018 - 2024 Daniel Wolf <nephatrine@gmail.com>
|
2023-10-25 10:58:37 -04:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: ISC
|
|
|
|
|
2024-03-29 13:38:03 -04:00
|
|
|
# hadolint ignore=DL3007
|
2024-03-27 22:46:31 -04:00
|
|
|
FROM code.nephatrine.net/nephnet/nxb-alpine:latest AS builder
|
2018-05-02 14:35:49 -04:00
|
|
|
|
2024-03-29 13:38:03 -04:00
|
|
|
# hadolint ignore=DL3018
|
|
|
|
RUN apk add --no-cache gd-dev geoip-dev libatomic_ops-dev libxslt-dev pcre-dev
|
2022-03-03 17:18:34 -05:00
|
|
|
|
2024-05-08 16:23:47 -04:00
|
|
|
ARG NGINX_VERSION=release-1.26.0
|
2023-04-17 12:22:57 -04:00
|
|
|
RUN git -C /root clone -b "$NGINX_VERSION" --single-branch --depth=1 https://github.com/nginx/nginx.git
|
2024-03-29 13:38:03 -04:00
|
|
|
WORKDIR /root/nginx
|
2022-04-20 12:17:35 -04:00
|
|
|
|
2024-03-29 13:38:03 -04:00
|
|
|
RUN ./auto/configure \
|
2018-05-02 14:35:49 -04:00
|
|
|
--prefix=/var/www \
|
|
|
|
--sbin-path=/usr/sbin/nginx \
|
|
|
|
--modules-path=/usr/lib/nginx/modules \
|
|
|
|
--conf-path=/etc/nginx/nginx.conf \
|
|
|
|
--error-log-path=/var/log/nginx/error.log \
|
|
|
|
--pid-path=/var/run/nginx.pid \
|
|
|
|
--lock-path=/var/run/nginx.lock \
|
|
|
|
--user=guardian \
|
|
|
|
--group=users \
|
|
|
|
--with-threads \
|
|
|
|
--with-file-aio \
|
|
|
|
--with-http_ssl_module \
|
|
|
|
--with-http_v2_module \
|
2023-06-18 16:31:27 -04:00
|
|
|
--with-http_v3_module \
|
2018-05-02 14:35:49 -04:00
|
|
|
--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_mp4_module \
|
|
|
|
--with-http_gunzip_module \
|
|
|
|
--with-http_gzip_static_module \
|
|
|
|
--with-http_auth_request_module \
|
|
|
|
--with-http_random_index_module \
|
|
|
|
--with-http_secure_link_module \
|
|
|
|
--with-http_slice_module \
|
|
|
|
--http-log-path=/var/log/nginx/access.log \
|
|
|
|
--http-client-body-temp-path=/var/cache/nginx/client_body \
|
|
|
|
--http-proxy-temp-path=/var/cache/nginx/proxy \
|
|
|
|
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi \
|
|
|
|
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi \
|
|
|
|
--http-scgi-temp-path=/var/cache/nginx/scgi \
|
|
|
|
--with-mail=dynamic \
|
|
|
|
--with-mail_ssl_module \
|
|
|
|
--with-stream=dynamic \
|
|
|
|
--with-stream_ssl_module \
|
|
|
|
--with-stream_realip_module \
|
|
|
|
--with-stream_geoip_module=dynamic \
|
|
|
|
--with-stream_ssl_preread_module \
|
|
|
|
--with-compat \
|
|
|
|
--with-pcre \
|
|
|
|
--with-pcre-jit \
|
|
|
|
--with-libatomic \
|
2023-06-30 19:07:35 -04:00
|
|
|
&& make -j$(( $(getconf _NPROCESSORS_ONLN) / 2 + 1 )) \
|
|
|
|
&& make -j$(( $(getconf _NPROCESSORS_ONLN) / 2 + 1 )) install
|
2022-04-20 12:17:35 -04:00
|
|
|
|
2024-03-29 14:23:44 -04:00
|
|
|
# ------------------------------
|
|
|
|
|
2024-03-29 13:38:03 -04:00
|
|
|
# hadolint ignore=DL3007
|
2024-03-27 22:46:31 -04:00
|
|
|
FROM code.nephatrine.net/nephnet/alpine-s6:latest
|
2022-04-20 12:17:35 -04:00
|
|
|
LABEL maintainer="Daniel Wolf <nephatrine@gmail.com>"
|
2021-04-26 16:42:32 -04:00
|
|
|
|
2024-03-29 13:38:03 -04:00
|
|
|
# hadolint ignore=DL3013,DL3018
|
|
|
|
RUN apk add --no-cache certbot geoip libgd libxslt pcre py3-pip \
|
|
|
|
&& pip3 install --no-cache-dir --break-system-packages zope.component \
|
2024-02-28 11:17:38 -05:00
|
|
|
&& mkdir -p /etc/nginx /usr/lib/nginx /var/cache/nginx /var/log/nginx /var/www \
|
|
|
|
&& rm -rf /tmp/* /var/tmp/*
|
2022-04-20 12:17:35 -04:00
|
|
|
|
|
|
|
COPY --from=builder /etc/nginx/ /etc/nginx/
|
|
|
|
COPY --from=builder /usr/lib/nginx/ /usr/lib/nginx/
|
|
|
|
COPY --from=builder /usr/sbin/nginx /usr/sbin/
|
|
|
|
COPY --from=builder /var/www/ /var/www/
|
2021-04-26 16:42:32 -04:00
|
|
|
COPY override /
|
2022-04-20 12:17:35 -04:00
|
|
|
|
2023-06-18 22:06:17 -04:00
|
|
|
EXPOSE 80/tcp 443/tcp 443/udp
|