forked from gesinn-it/docker-mediawiki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-sqlite.template
65 lines (57 loc) · 2.24 KB
/
Dockerfile-sqlite.template
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
###################################################
# gesinn-it/docker-mediawiki:mw-%%MEDIAWIKI_VERSION%%
#
# MEDIAWIKI_VERSION: MediaWiki Version
# COMPOSER_VERSION: Composer Major Version (1 or 2)
###################################################
FROM mediawiki:%%MEDIAWIKI_VERSION%%
# Fix owner
RUN chown -R www-data:www-data .
# Install required packages
RUN apt-get update && \
apt-get install -y \
sudo \
unzip \
less \
nano \
nodejs \
npm
RUN rm -rf /var/lib/apt/lists/*
# Install required php extensions
RUN docker-php-ext-install calendar
# Bashrc Alias
RUN echo "alias ll='ls -la'" >> /etc/bash.bashrc && \
echo "alias ..='cd ..'" >> /etc/bash.bashrc && \
echo "alias ...='cd ...'" >> /etc/bash.bashrc
# Install Composer
RUN php -r "copy('https://getcomposer.org/installer', 'installer');" && \
php -r "copy('https://composer.github.io/installer.sig', 'expected');" && \
echo `cat expected` " installer" | sha384sum -c - && \
php installer --version=%%COMPOSER_VERSION%% && \
rm -f installer expected && \
mv composer.phar /usr/local/bin/composer
# Install XDebug
RUN pecl install xdebug && \
bash -c "echo 'zend_extension=xdebug' >> /usr/local/etc/php/conf.d/99-xdebug.ini" && \
bash -c "echo 'xdebug.mode=coverage' >> /usr/local/etc/php/conf.d/99-xdebug.ini" && \
php -v
# Setup MediaWiki
RUN sudo -u www-data composer update && \
sudo -u www-data php maintenance/install.php \
--pass=wiki4everyone \
--server="http://localhost:8080" \
--scriptpath="" \
--dbtype=sqlite \
--dbname=wiki \
--dbuser=wiki \
--dbpass=wiki \
--dbpath=/var/www/data \
wiki WikiSysop
# Enable debug output, enable JS testing
RUN bash -c "echo 'error_reporting(E_ALL| E_STRICT);' >> LocalSettings.php" && \
bash -c "echo 'ini_set(\"display_errors\", 1);' >> LocalSettings.php" && \
bash -c 'echo "\$wgShowExceptionDetails = true;" >> LocalSettings.php' && \
bash -c 'echo "\$wgDevelopmentWarnings = true;" >> LocalSettings.php' && \
bash -c 'echo "\$wgEnableJavaScriptTest = true;" >> LocalSettings.php' && \
bash -c 'echo "\$wgDebugToolbar = true;" >> LocalSettings.php' && \
tail -n6 LocalSettings.php