Actually build and install nginx-dav-ext-module.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2024-12-08 02:50:28 -06:00
parent 9c935596b3
commit ad50519b4f
3 changed files with 12 additions and 2 deletions

View File

@@ -1,7 +1,12 @@
FROM nginx
ADD nginx-dav-ext-module /
RUN cd nginx-dav-ext-module && ls
ADD nginx-dav-ext-module /modules/nginx-dav-ext-module
ADD nginx-get-options /usr/local/bin
RUN echo 'deb-src [trusted=yes] https://nginx.org/packages/mainline/debian/ bookworm nginx' > /etc/apt/sources.list.d/nginx.list
RUN DEV_PACKAGES="build-essential dpkg-dev libpcre2-dev libssl-dev zlib1g-dev libxslt1-dev" && \
cd modules && apt update && apt install -y $DEV_PACKAGES && apt source nginx && cd nginx-${NGINX_VERSION} && \
./configure $(nginx-get-options) --add-dynamic-module=../nginx-dav-ext-module && make && cp objs/*.so /etc/nginx/modules && \
rm /etc/apt/sources.list.d/nginx.list && apt remove -y $DEV_PACKAGES && apt -y autoremove && cd / && rm -rf modules
ENV VOUCH_INTERNAL=vouch:9090
ADD nginx.conf.template /

View File

@@ -0,0 +1,3 @@
#!/bin/sh
BASE_CONFIG_PATH=/etc/nginx/nginx.conf
echo "load_module /etc/nginx/modules/ngx_http_dav_ext_module.so;\n$(cat $BASE_CONFIG_PATH)" > $BASE_CONFIG_PATH

2
nginx-get-options Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
nginx -V 2>&1 | grep 'configure' | cut -d ':' -f 2 | sed 's/--with-cc-opt/\n/g' | head -n 1