commented the conf files that wasn't present yet
and have added security and proxy common files to be copied too
This commit is contained in:
50
Dockerfile
50
Dockerfile
@@ -5,31 +5,31 @@ ENV NGINX_VERSION=1.29.3
|
||||
|
||||
# Build dependencies
|
||||
RUN apk add --no-cache \
|
||||
build-base pcre2-dev zlib-dev openssl-dev linux-headers curl gnupg tar
|
||||
build-base pcre2-dev zlib-dev openssl-dev linux-headers curl gnupg tar
|
||||
|
||||
WORKDIR /tmp
|
||||
# Download and extract Nginx
|
||||
RUN curl -fSL https://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -o nginx.tar.gz \
|
||||
&& tar -zxf nginx.tar.gz
|
||||
&& tar -zxf nginx.tar.gz
|
||||
|
||||
WORKDIR /tmp/nginx-$NGINX_VERSION
|
||||
# Configure Nginx with all required modules
|
||||
RUN ./configure \
|
||||
--prefix=/etc/nginx \
|
||||
--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 \
|
||||
--http-log-path=/var/log/nginx/access.log \
|
||||
--pid-path=/var/run/nginx.pid \
|
||||
--lock-path=/var/run/nginx.lock \
|
||||
--with-http_ssl_module \
|
||||
--with-http_v2_module \
|
||||
--with-http_gzip_static_module \
|
||||
--with-stream \
|
||||
--with-stream_ssl_module \
|
||||
--with-mail \
|
||||
--with-mail_ssl_module
|
||||
--prefix=/etc/nginx \
|
||||
--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 \
|
||||
--http-log-path=/var/log/nginx/access.log \
|
||||
--pid-path=/var/run/nginx.pid \
|
||||
--lock-path=/var/run/nginx.lock \
|
||||
--with-http_ssl_module \
|
||||
--with-http_v2_module \
|
||||
--with-http_gzip_static_module \
|
||||
--with-stream \
|
||||
--with-stream_ssl_module \
|
||||
--with-mail \
|
||||
--with-mail_ssl_module
|
||||
RUN make -j$(nproc)
|
||||
RUN make install
|
||||
|
||||
@@ -49,13 +49,15 @@ COPY --from=builder /etc/nginx /etc/nginx
|
||||
|
||||
# Default configuration
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY conf.d/web.conf /etc/nginx/conf.d/web.conf
|
||||
COPY conf.d/git.conf /etc/nginx/conf.d/git.conf
|
||||
COPY conf.d/mail.conf /etc/nginx/conf.d/mail.conf
|
||||
COPY conf.d/media.conf /etc/nginx/conf.d/media.conf
|
||||
COPY conf.d/network.conf /etc/nginx/conf.d/network.conf
|
||||
COPY conf.d/utils.conf /etc/nginx/conf.d/utils.conf
|
||||
COPY conf.d/game.conf /etc/nginx/conf.d/game.conf
|
||||
COPY conf.d/security.conf /etc/nginx/conf.d/security.conf
|
||||
COPY conf.d/proxy-common.conf /etc/nginx/conf.d/proxy-common.conf
|
||||
#COPY conf.d/web.conf /etc/nginx/conf.d/web.conf
|
||||
#COPY conf.d/git.conf /etc/nginx/conf.d/git.conf
|
||||
#COPY conf.d/mail.conf /etc/nginx/conf.d/mail.conf
|
||||
#COPY conf.d/media.conf /etc/nginx/conf.d/media.conf
|
||||
#COPY conf.d/network.conf /etc/nginx/conf.d/network.conf
|
||||
#COPY conf.d/utils.conf /etc/nginx/conf.d/utils.conf
|
||||
#COPY conf.d/game.conf /etc/nginx/conf.d/game.conf
|
||||
|
||||
# Ports for HTTP/HTTPS + optional mail/TCP/UDP (25 110 143 465 587 993 995) + optional minecraft java/bedrock (25565 19132)
|
||||
EXPOSE 80 443
|
||||
|
||||
Reference in New Issue
Block a user