~dricottone/container-images

aeea21ad11a681b794ebe21bda485938cffe5f12 — Dominic Ricottone 1 year, 4 months ago 5f2e7bd
Adding a WebDAV variant of Nginx
5 files changed, 41 insertions(+), 4 deletions(-)

M .gitmodules
A nginx/Dockerfile.webdav
M nginx/Makefile
M nginx/README.md
A nginx/nginx-dav-ext-module
M .gitmodules => .gitmodules +3 -0
@@ 1,3 1,6 @@
[submodule "nitter/src"]
	path = nitter/src
	url = https://github.com/PrivacyDevel/nitter
[submodule "nginx/nginx-dav-ext-module"]
	path = nginx/nginx-dav-ext-module
	url = https://github.com/arut/nginx-dav-ext-module

A nginx/Dockerfile.webdav => nginx/Dockerfile.webdav +23 -0
@@ 0,0 1,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/


M nginx/Makefile => nginx/Makefile +13 -4
@@ 2,12 2,21 @@ CONMAN=sudo docker

REGISTRY=registry.intra.dominic-ricottone.com
IMAGE=nginx
TAG=latest
TAG_HTTP=latest
TAG_WEBDAV=webdav

image:
image: image-http image-webdav

image-http:
	$(CONMAN) buildx build --push \
		--platform linux/arm64,linux/amd64 \
		--tag $(REGISTRY)/$(IMAGE):$(TAG) \
		--tag $(REGISTRY)/$(IMAGE):$(TAG_HTTP) \
		.

.PHONY: image
image-webdav:
	$(CONMAN) buildx build --push \
		--platform linux/arm64,linux/amd64 \
		--tag $(REGISTRY)/$(IMAGE):$(TAG_WEBDAV) \
		. -f Dockerfile.webdav

.PHONY: image image-http image-webdav

M nginx/README.md => nginx/README.md +1 -0
@@ 11,6 11,7 @@ make image
### Tags

 + `latest`
 + `webdav` for WebDAV support

----


A nginx/nginx-dav-ext-module => nginx/nginx-dav-ext-module +1 -0
@@ 0,0 1,1 @@
Subproject commit f5e30888a256136d9c550bf1ada77d6ea78a48af