mirror of
https://github.com/cupcakearmy/docker-static.git
synced 2025-01-02 13:36:34 +00:00
update version
This commit is contained in:
parent
e3967d569a
commit
c3c7ce22f8
12
Dockerfile
12
Dockerfile
@ -1,23 +1,24 @@
|
|||||||
|
# BUILDER
|
||||||
FROM alpine AS builder
|
FROM alpine AS builder
|
||||||
|
|
||||||
ARG DEP_DEV="alpine-sdk zlib-dev pcre-dev openssl-dev gd-dev"
|
ARG DEP_DEV="alpine-sdk zlib-dev pcre-dev openssl-dev gd-dev"
|
||||||
ARG NGINX_MODULES="--with-http_realip_module --with-threads --with-http_ssl_module --with-http_v2_module --with-http_image_filter_module --with-http_gzip_static_module --with-http_secure_link_module"
|
ARG NGINX_MODULES="--with-http_realip_module --with-threads --with-http_ssl_module --with-http_v2_module --with-http_image_filter_module --with-http_gzip_static_module --with-http_secure_link_module"
|
||||||
ARG NGINX=1.20.2
|
ARG NGINX=1.21.6
|
||||||
|
|
||||||
RUN apk add --no-cache ${DEP_DEV}
|
RUN apk add --no-cache ${DEP_DEV}
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
RUN curl https://nginx.org/download/nginx-${NGINX}.tar.gz | tar xz
|
RUN curl https://nginx.org/download/nginx-${NGINX}.tar.gz | tar xz
|
||||||
RUN mv nginx-${NGINX} nginx
|
RUN mv nginx-${NGINX} nginx
|
||||||
RUN git clone --recursive https://github.com/google/ngx_brotli.git
|
RUN git clone --recursive https://github.com/google/ngx_brotli.git
|
||||||
|
|
||||||
WORKDIR /build/nginx
|
WORKDIR /build/nginx
|
||||||
RUN ./configure ${NGINX_MODULES} --add-module=../ngx_brotli
|
RUN ./configure ${NGINX_MODULES} --add-module=../ngx_brotli
|
||||||
RUN make && make install
|
RUN make
|
||||||
|
RUN make install
|
||||||
|
|
||||||
|
|
||||||
|
# RUNNER
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
ARG DEP_RUN="pcre openssl gd tzdata"
|
ARG DEP_RUN="pcre openssl gd tzdata"
|
||||||
@ -26,12 +27,9 @@ COPY --from=builder /usr/local/nginx /usr/local/nginx
|
|||||||
RUN apk add --no-cache ${DEP_RUN} \
|
RUN apk add --no-cache ${DEP_RUN} \
|
||||||
&& ln -sf /dev/stdout /usr/local/nginx/logs/access.log \
|
&& ln -sf /dev/stdout /usr/local/nginx/logs/access.log \
|
||||||
&& ln -sf /dev/stderr /usr/local/nginx/logs/error.log
|
&& ln -sf /dev/stderr /usr/local/nginx/logs/error.log
|
||||||
|
|
||||||
COPY ./conf/nginx.conf /usr/local/nginx/conf/nginx.conf
|
COPY ./conf/nginx.conf /usr/local/nginx/conf/nginx.conf
|
||||||
COPY ./conf/default.conf /usr/local/nginx/conf/sites/default.conf
|
COPY ./conf/default.conf /usr/local/nginx/conf/sites/default.conf
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
CMD ["/usr/local/nginx/sbin/nginx", "-g", "daemon off;"]
|
CMD ["/usr/local/nginx/sbin/nginx", "-g", "daemon off;"]
|
||||||
|
Loading…
Reference in New Issue
Block a user