~dricottone/container-images

ref: ae56e0e550ad7213a712233f7acc153336b384ae container-images/nginx/Dockerfile.webdav -rw-r--r-- 958 bytes
ae56e0e5Dominic Ricottone nitter a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM docker.io/library/nginx:alpine as builder

COPY nginx-dav-ext-module /nginx-dav-ext-module

RUN curl -o /nginx.tar.gz https://nginx.org/download/nginx-$(apk list -i nginx 2>/dev/null | sed 's/^nginx-\([0-9.]\+\)-.*$/\1/').tar.gz \
	&& cd / \
	&& tar -xzf /nginx.tar.gz \
	&& mv /nginx-$(apk list -i nginx 2>/dev/null | sed 's/^nginx-\([0-9.]\+\)-.*$/\1/') /nginx

RUN apk add --no-cache linux-headers openssl-dev pcre2-dev zlib-dev openssl abuild musl-dev libxslt-dev libxml2-utils make gcc unzip xz g++ coreutils \
	&& cd /nginx \
	&& ./configure --with-compat --with-http_dav_module --add-dynamic-module=/nginx-dav-ext-module \
	&& make modules

FROM docker.io/library/nginx:alpine

COPY --from=builder /nginx/objs/ngx_http_dav_ext_module.so /etc/nginx/modules/

RUN echo "load_module modules/ngx_http_dav_ext_module.so;" > /etc/nginx/modules/ngx_http_dav_ext_module.conf

COPY *.conf /etc/nginx/
COPY error_pages.d/ /etc/nginx/conf.d/error_pages.d/