From 5f4e6002984bd31f27548720010c406268cdad75 Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Wed, 27 Apr 2022 15:29:20 -0700 Subject: [PATCH] Mount full lib directory as volume --- Dockerfile | 2 +- README.md | 18 +++++++++--------- docker-startup.sh | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 61285d8..eff8a2b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,7 @@ RUN mkdir /var/run/lighttpd && chown www-data.www-data /var/run/lighttpd COPY docker-startup.sh /startup.sh EXPOSE 80 -VOLUME ["/dokuwiki/data/","/dokuwiki/lib/plugins/","/dokuwiki/conf/","/dokuwiki/lib/tpl/","/var/log/"] +VOLUME ["/dokuwiki/data/","/dokuwiki/lib/","/dokuwiki/conf/","/var/log/"] ENTRYPOINT ["/startup.sh"] CMD ["run"] diff --git a/README.md b/README.md index c95a47d..51db791 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,14 @@ DokuWiki docker container To run image: ------------- - docker run -d -p 80:80 --name my_wiki mprasil/dokuwiki +First, build the image locally to incorporate the changes [from the upstream +image](https://hub.docker.com/r/mprasil/dokuwiki): + + docker build -t my_dokuwiki . + +Once built, a container of this modified image can be run: + + docker run -d -p 80:80 --name my_wiki my_dokuwiki You can now visit the install page to configure your new DokuWiki wiki. @@ -19,8 +26,7 @@ The run command above will store your data in internal Docker volumes. If you pr docker run -d -p 80:80 --name my_wiki \ -v /data/docker/dokuwiki/data:/dokuwiki/data \ -v /data/docker/dokuwiki/conf:/dokuwiki/conf \ - -v /data/docker/dokuwiki/lib/plugins:/dokuwiki/lib/plugins \ - -v /data/docker/dokuwiki/lib/tpl:/dokuwiki/lib/tpl \ + -v /data/docker/dokuwiki/lib:/dokuwiki/lib \ -v /data/docker/dokuwiki/logs:/var/log \ mprasil/dokuwiki @@ -80,9 +86,3 @@ nice URLs in settings (Advanced -> Nice URLs, set to ".htaccess") For better performance enable xsendfile in settings. Set to proprietary lighttpd header (for lighttpd < 1.5) - -Build your own --------------- - - docker build -t my_dokuwiki . - diff --git a/docker-startup.sh b/docker-startup.sh index d904538..7b97dd9 100755 --- a/docker-startup.sh +++ b/docker-startup.sh @@ -25,7 +25,7 @@ if [ "$1" = 'overwrite' ]; then overwrite=1; else overwrite=0; fi if [ "$1" = 'run' ] || [ "$1" = 'downgrade' ] || [ "$1" = 'overwrite' ]; then # Check each volume directory in turn - for d in conf data lib/plugins lib/tpl; do + for d in conf data lib; do if [ -f "$dokudir/$d/$verfile" ]; then volumever="$(date -f <(awk '{print $1}' "$dokudir/$d/$verfile" | tr -d '[:alpha:]') +%s)" else