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 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 "$@" 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.