This repository has been archived by the owner on Dec 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDockerfile
48 lines (43 loc) · 2.2 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM alpine/git AS downloader
RUN mkdir -p /var/www \
&& git clone --depth 1 --branch=master https://gitlab.com/tikiwiki/tiki.git /var/www/html
FROM tikiwiki/php:7.2-apache
LABEL mantainer "TikiWiki <[email protected]>"
COPY --from=downloader /var/www/html /var/www/html
WORKDIR "/var/www/html"
RUN composer global require hirak/prestissimo \
&& php \
-d zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so) \
/usr/local/bin/composer install --working-dir /var/www/html/vendor_bundled --prefer-dist \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* \
&& rm -rf /root/.composer \
&& { \
echo "<?php"; \
echo " \$db_tiki = getenv('TIKI_DB_DRIVER') ?: 'mysqli';"; \
echo " \$dbversion_tiki = getenv('TIKI_DB_VERSION') ?: '21';"; \
echo " \$host_tiki = getenv('TIKI_DB_HOST') ?: 'db';"; \
echo " \$user_tiki = getenv('TIKI_DB_USER');"; \
echo " \$pass_tiki = getenv('TIKI_DB_PASS');"; \
echo " \$dbs_tiki = getenv('TIKI_DB_NAME') ?: 'tikiwiki';"; \
echo " \$client_charset = 'utf8mb4';"; \
echo " foreach (glob('/var/www/conf.d/*.php') as \$conf) { include(\$conf); }"; \
} > /var/www/html/db/local.php \
&& {\
echo "session.save_path=/var/www/sessions"; \
} > /usr/local/etc/php/conf.d/tiki_session.ini \
&& /bin/bash htaccess.sh \
&& mkdir -p /var/www/sessions \
&& mkdir -p /var/www/conf.d \
&& chown -R www-data /var/www/sessions \
&& chown -R www-data /var/www/html/db/ \
&& chown -R www-data /var/www/html/dump/ \
&& chown -R www-data /var/www/html/img/trackers/ \
&& chown -R www-data /var/www/html/img/wiki/ \
&& chown -R www-data /var/www/html/img/wiki_up/ \
&& chown -R www-data /var/www/html/modules/cache/ \
&& chown -R www-data /var/www/html/temp/ \
&& chown -R www-data /var/www/html/templates/
VOLUME ["/var/www/conf.d/","/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/"]
EXPOSE 80
CMD ["apache2-foreground"]