added some modules to the nginx and added made group command too along one tzdata package to be installed at ready stage
This commit is contained in:
31
Dockerfile
31
Dockerfile
@@ -24,25 +24,46 @@ RUN ./configure \
|
|||||||
--pid-path=/var/run/nginx.pid \
|
--pid-path=/var/run/nginx.pid \
|
||||||
--lock-path=/var/run/nginx.lock \
|
--lock-path=/var/run/nginx.lock \
|
||||||
--with-http_ssl_module \
|
--with-http_ssl_module \
|
||||||
--with-http_v2_module \
|
--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_gzip_static_module \
|
--with-http_gzip_static_module \
|
||||||
|
--with-http_random_index_module \
|
||||||
|
--with-http_secure_link_module \
|
||||||
|
--with-http_stub_status_module \
|
||||||
|
--with-http_auth_request_module \
|
||||||
|
--with-mail \
|
||||||
|
--with-mail_ssl_module \
|
||||||
|
--with-file-aio \
|
||||||
|
--with-threads \
|
||||||
--with-stream \
|
--with-stream \
|
||||||
--with-stream_ssl_module \
|
--with-stream_ssl_module \
|
||||||
--with-mail \
|
--with-stream_realip_module \
|
||||||
--with-mail_ssl_module
|
--with-http_slice_module \
|
||||||
|
--with-http_v2_module
|
||||||
RUN make -j$(nproc)
|
RUN make -j$(nproc)
|
||||||
RUN make install
|
RUN make install
|
||||||
|
RUN rm -rf /tmp/*
|
||||||
|
RUN rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
# --- Stage 2: Runtime ---
|
# --- Stage 2: Runtime ---
|
||||||
FROM alpine:3.22
|
FROM alpine:3.22
|
||||||
|
|
||||||
# Runtime dependencies
|
# Runtime dependencies
|
||||||
RUN apk add \
|
RUN apk add \
|
||||||
pcre2 zlib openssl ca-certificates libcap curl
|
pcre2 zlib openssl ca-certificates tzdata libcap curl git
|
||||||
RUN adduser -D -g 'nginx' nginx
|
RUN addgroup -S nginx
|
||||||
|
RUN adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx
|
||||||
RUN mkdir -p /var/cache/nginx /etc/nginx/conf.d /etc/nginx/stream_conf.d /usr/share/nginx/html /var/run
|
RUN mkdir -p /var/cache/nginx /etc/nginx/conf.d /etc/nginx/stream_conf.d /usr/share/nginx/html /var/run
|
||||||
RUN chown -R nginx:nginx /var/cache/nginx /var/run /etc/nginx /usr/share/nginx/html
|
RUN chown -R nginx:nginx /var/cache/nginx /var/run /etc/nginx /usr/share/nginx/html
|
||||||
|
|
||||||
|
# Copy dummy html
|
||||||
|
COPY index.html /var/www/html/index.html
|
||||||
|
|
||||||
# Copy Nginx from builder
|
# Copy Nginx from builder
|
||||||
COPY --from=builder /usr/sbin/nginx /usr/sbin/nginx
|
COPY --from=builder /usr/sbin/nginx /usr/sbin/nginx
|
||||||
COPY --from=builder /etc/nginx /etc/nginx
|
COPY --from=builder /etc/nginx /etc/nginx
|
||||||
|
|||||||
Reference in New Issue
Block a user