From 1c78d3a9a7f5241a887c17d9fe6600f0b185da4d Mon Sep 17 00:00:00 2001 From: alfredp Date: Fri, 16 May 2025 00:48:32 -0700 Subject: [PATCH 1/3] pinning to tag 2.4.43-alpine which uses Alpine 3.12 --- 2.4/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.4/Dockerfile b/2.4/Dockerfile index 6083e29..bb699ce 100644 --- a/2.4/Dockerfile +++ b/2.4/Dockerfile @@ -1,4 +1,4 @@ -FROM httpd:alpine +FROM httpd:2.4.43-alpine # These variables are inherited from the httpd:alpine image: # ENV HTTPD_PREFIX /usr/local/apache2 From 9f36e099203891e451ebaf646eca66eeac154155 Mon Sep 17 00:00:00 2001 From: alfredp Date: Fri, 16 May 2025 00:51:31 -0700 Subject: [PATCH 2/3] introduction LOCAL env var for local testing --- 2.4/docker-entrypoint.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/2.4/docker-entrypoint.sh b/2.4/docker-entrypoint.sh index 3ee4575..67eeb95 100755 --- a/2.4/docker-entrypoint.sh +++ b/2.4/docker-entrypoint.sh @@ -10,6 +10,7 @@ set -e # PASSWORD # ANONYMOUS_METHODS # SSL_CERT +# LOCAL # Just in case this environment variable has gone missing. HTTPD_PREFIX="${HTTPD_PREFIX:-/usr/local/apache2}" @@ -103,4 +104,11 @@ fi [ ! -e "/var/lib/dav/DavLock" ] && touch "/var/lib/dav/DavLock" chown -R www-data:www-data "/var/lib/dav" +# Give yourself the ability to manually +# create and edit shared files +if [ "x$LOCAL" != "x" ]; then + chmod o+w /var/lib/dav/data + umask 0021 +fi + exec "$@" From c9838a95489dcaf53299e8b88dc8cde04bd2a4e2 Mon Sep 17 00:00:00 2001 From: alfredp Date: Fri, 16 May 2025 13:28:14 -0700 Subject: [PATCH 3/3] updated README with a description of the LOCAL env variable --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f9b9e8e..4fd4c73 100644 --- a/README.md +++ b/README.md @@ -104,4 +104,4 @@ All environment variables are optional. You probably want to at least specify `U * **`PASSWORD`**: Authenticate with this password (and the username above). This is ignored if you bind mount your own authentication file to `/user.passwd`. * **`ANONYMOUS_METHODS`**: Comma-separated list of HTTP request methods (eg, `GET,POST,OPTIONS,PROPFIND`). Clients can use any method you specify here without authentication. Set to `ALL` to disable authentication. The default is to disallow any anonymous access. * **`SSL_CERT`**: Set to `selfsigned` to generate a self-signed certificate and enable Apache's SSL module. If you specify `SERVER_NAMES`, the first domain is set as the Common Name. - +* **`LOCAL`**: Set to `true` to allow manual creation and edit of files on the mounted volume. Useful for local testing.