Renovate Bot | 5b92936 | 2023-03-06 06:00:46 +0000 | [diff] [blame^] | 1 | FROM tikiwiki/php:7.4-apache |
Matthias Andreas Benkard | aa40464 | 2019-12-31 13:23:47 +0100 | [diff] [blame] | 2 | LABEL mantainer "TikiWiki <tikiwiki-devel@lists.sourceforge.net>" |
| 3 | |
Matthias Andreas Benkard | 3fe5b94 | 2020-12-29 19:46:54 +0100 | [diff] [blame] | 4 | ARG COMMIT=a58da1b2478eb52627c06414db307b338352aa85 |
| 5 | ARG TIKI_SOURCE="https://gitlab.com/tikiwiki/tiki/-/archive/$COMMIT/tiki-$COMMIT.tar.gz" |
| 6 | |
Matthias Andreas Benkard | aa40464 | 2019-12-31 13:23:47 +0100 | [diff] [blame] | 7 | WORKDIR "/var/www/html" |
| 8 | |
| 9 | # If you have https_proxy with SslBump, place it's cetificate |
| 10 | # in this variable to have curl and composer content cached |
| 11 | ARG HTTPS_PROXY_CERT="" |
| 12 | |
| 13 | RUN echo "${HTTPS_PROXY_CERT}" > /usr/local/share/ca-certificates/https_proxy.crt \ |
| 14 | && update-ca-certificates \ |
| 15 | && curl -o tiki.tar.gz -L "${TIKI_SOURCE}" \ |
| 16 | && chown root: /var/www/html \ |
| 17 | && tar -C /var/www/html --no-same-owner -zxf tiki.tar.gz --strip 1 \ |
| 18 | && composer global require hirak/prestissimo \ |
| 19 | && composer install --working-dir /var/www/html/vendor_bundled --prefer-dist \ |
| 20 | && rm tiki.tar.gz \ |
| 21 | && rm -rf /var/lib/apt/lists/* \ |
| 22 | && rm -rf /tmp/* \ |
| 23 | && rm -rf /root/.composer \ |
| 24 | && { \ |
| 25 | echo "<?php"; \ |
| 26 | echo " \$db_tiki = getenv('TIKI_DB_DRIVER') ?: 'mysqli';"; \ |
| 27 | echo " \$dbversion_tiki = getenv('TIKI_DB_VERSION') ?: '21';"; \ |
| 28 | echo " \$host_tiki = getenv('TIKI_DB_HOST') ?: 'db';"; \ |
| 29 | echo " \$user_tiki = getenv('TIKI_DB_USER');"; \ |
| 30 | echo " \$pass_tiki = getenv('TIKI_DB_PASS');"; \ |
| 31 | echo " \$dbs_tiki = getenv('TIKI_DB_NAME') ?: 'tikiwiki';"; \ |
| 32 | echo " \$client_charset = 'utf8mb4';"; \ |
| 33 | } > /var/www/html/db/local.php \ |
| 34 | && {\ |
| 35 | echo "session.save_path=/var/www/sessions"; \ |
| 36 | } > /usr/local/etc/php/conf.d/tiki_session.ini \ |
| 37 | && /bin/bash htaccess.sh \ |
| 38 | && mkdir -p /var/www/sessions \ |
| 39 | && chown -R www-data /var/www/sessions \ |
| 40 | && chown -R www-data /var/www/html/db/ \ |
| 41 | && chown -R www-data /var/www/html/dump/ \ |
| 42 | && chown -R www-data /var/www/html/img/trackers/ \ |
| 43 | && chown -R www-data /var/www/html/img/wiki/ \ |
| 44 | && chown -R www-data /var/www/html/img/wiki_up/ \ |
| 45 | && chown -R www-data /var/www/html/modules/cache/ \ |
| 46 | && chown -R www-data /var/www/html/temp/ \ |
| 47 | && chown -R www-data /var/www/html/templates/ |
| 48 | |
| 49 | VOLUME ["/var/www/html/files/","/var/www/html/img/trackers/","/var/www/html/img/wiki_up/","/var/www/html/img/wiki/","/var/www/html/modules/cache/","/var/www/html/storage/","/var/www/html/temp/","/var/www/sessions/"] |
| 50 | EXPOSE 80 |
| 51 | CMD ["apache2-foreground"] |