Loading Dockerfile +3 −9 Original line number Diff line number Diff line Loading @@ -14,15 +14,9 @@ RUN apt-get update \ && a2enmod rewrite \ && sed -i 's/^ServerSignature .*/ServerSignature Off/' /etc/apache2/conf-available/security.conf \ && sed -i 's/^ServerTokens .*/ServerTokens Minimal/' /etc/apache2/conf-available/security.conf \ && curl -sL $DOKUWIKI_URL \ | tar xz -C /var/www/html --strip-components=1 \ && cp /var/www/html/.htaccess.dist /var/www/html/conf/apache.conf \ && ln -s conf/apache.conf /var/www/html/.htaccess \ && chown -R www-data:www-data /var/www/html \ && mv /var/www/html/.htaccess.dist /var/www/html/conf/apache.conf \ && mkdir /usr/share/dokuwiki \ && mv /var/www/html/lib/plugins /var/www/html/lib/tpl /usr/share/dokuwiki \ && true && install -d -m 755 /usr/share/dokuwiki \ && curl -sL $DOKUWIKI_URL -o /usr/share/dokuwiki/dokuwiki.tgz \ && install -d -m 750 -o www-data -g www-data /var/www/html COPY entrypoint.sh /usr/local/bin ENTRYPOINT ["entrypoint.sh"] Loading entrypoint.sh +24 −4 Original line number Diff line number Diff line #!/bin/sh #!/bin/bash -x if ! test -e /usr/share/dokuwiki/updated; then cp -vura -t /var/www/html/lib /usr/share/dokuwiki/plugins /usr/share/dokuwiki/tpl date > /usr/share/dokuwiki/updated tarball=/usr/share/dokuwiki/dokuwiki.tgz # See: https://www.dokuwiki.org/install:upgrade if [[ -e "$tarball" ]]; then pushd /var/www/html > /dev/null # Deploy last version from tarball. tar --extract --gzip --strip-components=1 --file "$tarball" --no-same-owner # Set file spermissions. chown -vR www-data:www-data conf data lib/{tpl,plugins} chmod -v 750 conf data # Install default .htaccess [[ -e .htaccess ]] || mv -v .htaccess.dist .htaccess # Remove deleted files. grep -Ev '^($|#)' data/deleted.files | xargs -n 1 rm -vf # Force cache purge [ -e conf/local.php ] && touch -v conf/local.php popd > /dev/null rm -v "$tarball" fi exec docker-php-entrypoint "$@" Loading
Dockerfile +3 −9 Original line number Diff line number Diff line Loading @@ -14,15 +14,9 @@ RUN apt-get update \ && a2enmod rewrite \ && sed -i 's/^ServerSignature .*/ServerSignature Off/' /etc/apache2/conf-available/security.conf \ && sed -i 's/^ServerTokens .*/ServerTokens Minimal/' /etc/apache2/conf-available/security.conf \ && curl -sL $DOKUWIKI_URL \ | tar xz -C /var/www/html --strip-components=1 \ && cp /var/www/html/.htaccess.dist /var/www/html/conf/apache.conf \ && ln -s conf/apache.conf /var/www/html/.htaccess \ && chown -R www-data:www-data /var/www/html \ && mv /var/www/html/.htaccess.dist /var/www/html/conf/apache.conf \ && mkdir /usr/share/dokuwiki \ && mv /var/www/html/lib/plugins /var/www/html/lib/tpl /usr/share/dokuwiki \ && true && install -d -m 755 /usr/share/dokuwiki \ && curl -sL $DOKUWIKI_URL -o /usr/share/dokuwiki/dokuwiki.tgz \ && install -d -m 750 -o www-data -g www-data /var/www/html COPY entrypoint.sh /usr/local/bin ENTRYPOINT ["entrypoint.sh"] Loading
entrypoint.sh +24 −4 Original line number Diff line number Diff line #!/bin/sh #!/bin/bash -x if ! test -e /usr/share/dokuwiki/updated; then cp -vura -t /var/www/html/lib /usr/share/dokuwiki/plugins /usr/share/dokuwiki/tpl date > /usr/share/dokuwiki/updated tarball=/usr/share/dokuwiki/dokuwiki.tgz # See: https://www.dokuwiki.org/install:upgrade if [[ -e "$tarball" ]]; then pushd /var/www/html > /dev/null # Deploy last version from tarball. tar --extract --gzip --strip-components=1 --file "$tarball" --no-same-owner # Set file spermissions. chown -vR www-data:www-data conf data lib/{tpl,plugins} chmod -v 750 conf data # Install default .htaccess [[ -e .htaccess ]] || mv -v .htaccess.dist .htaccess # Remove deleted files. grep -Ev '^($|#)' data/deleted.files | xargs -n 1 rm -vf # Force cache purge [ -e conf/local.php ] && touch -v conf/local.php popd > /dev/null rm -v "$tarball" fi exec docker-php-entrypoint "$@"