some cleanup

As suggested by @glensc
This commit is contained in:
Andreas Gohr 2021-01-18 17:24:20 +01:00
parent 819614450a
commit 72c2822208
2 changed files with 6 additions and 7 deletions

View File

@ -2,16 +2,13 @@ FROM php:7.4-apache
ARG BRANCH=stable
COPY ./entrypoint.sh /usr/local/sbin/entrypoint
RUN chmod +x /usr/local/sbin/entrypoint
COPY --chmod=755 ./entrypoint.sh /usr/local/sbin/entrypoint
# prepare overlay directories
# https://stackoverflow.com/a/33275168/172068
RUN ["/bin/bash", "-c", "mkdir -p /overlay/{original,storage/{dokuwiki,work}}"]
VOLUME /overlay/storage
# setup DokuWiki
RUN cd /overlay/original && \
RUN mkdir -p /overlay/original && \
cd /overlay/original && \
curl -L http://github.com/splitbrain/dokuwiki/tarball/$BRANCH | \
tar --strip-components=1 -xzvf - && \
chown -R www-data:www-data .

View File

@ -1,9 +1,11 @@
#!/bin/bash
set -e
# prepare overlay directories
# https://stackoverflow.com/a/33275168/172068
mkdir -p /overlay/storage/{dokuwiki,work}
mount -t overlay \
-o lowerdir=/overlay/original,upperdir=/overlay/storage/dokuwiki,workdir=/overlay/storage/work \
overlay /var/www/html
docker-php-entrypoint apache2-foreground
exec docker-php-entrypoint apache2-foreground