85 lines
3.5 KiB
Docker
85 lines
3.5 KiB
Docker
FROM mediawiki:1.39
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y libpng-dev git zip \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& docker-php-ext-install -j$(nproc) gd calendar
|
|
|
|
# Needed for making branch name from MEDIAWIKI_MAJOR_VERSION
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
# needs to be downloaded before composer is run
|
|
# https://www.mediawiki.org/wiki/Extension:OpenIDConnect
|
|
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
|
|
https://gerrit.wikimedia.org/r/mediawiki/extensions/OpenIDConnect \
|
|
/var/www/html/extensions/OpenIDConnect
|
|
|
|
COPY composer.local.json /var/www/html/
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
RUN cd /var/www/html/ && composer update --no-dev
|
|
|
|
|
|
# from composer.local.json:
|
|
# https://www.mediawiki.org/wiki/Extension:PluggableAuth
|
|
# https://www.mediawiki.org/wiki/Extension:LDAPProvider
|
|
# https://www.mediawiki.org/wiki/Extension:LDAPAuthentication2
|
|
# https://www.mediawiki.org/wiki/Extension:Semantic_Approved_Revs
|
|
# https://www.mediawiki.org/wiki/Extension:QRLite
|
|
|
|
# https://www.mediawiki.org/wiki/Extension:LDAPUserInfo
|
|
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
|
|
https://github.com/wikimedia/mediawiki-extensions-LDAPUserInfo \
|
|
/var/www/html/extensions/LDAPUserInfo
|
|
|
|
# https://www.mediawiki.org/wiki/Extension:MobileFrontend
|
|
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
|
|
https://gerrit.wikimedia.org/r/mediawiki/extensions/MobileFrontend \
|
|
/var/www/html/extensions/MobileFrontend
|
|
|
|
# https://www.mediawiki.org/wiki/Extension:NativeSvgHandler
|
|
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_}\
|
|
https://gerrit.wikimedia.org/r/mediawiki/extensions/NativeSvgHandler \
|
|
/var/www/html/extensions/NativeSvgHandler
|
|
|
|
# https://www.mediawiki.org/wiki/Extension:CodeMirror
|
|
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
|
|
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror \
|
|
/var/www/html/extensions/CodeMirror
|
|
|
|
# https://www.mediawiki.org/wiki/Extension:Widgets
|
|
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
|
|
https://gerrit.wikimedia.org/r/mediawiki/extensions/Widgets \
|
|
/var/www/html/extensions/Widgets \
|
|
&& cd /var/www/html/extensions/Widgets && composer update --no-dev \
|
|
&& chown www-data: compiled_templates/
|
|
|
|
# https://www.mediawiki.org/wiki/Extension:Semantic_ACL
|
|
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
|
|
https://gerrit.wikimedia.org/r/mediawiki/extensions/SemanticACL \
|
|
/var/www/html/extensions/SemanticACL
|
|
|
|
# https://www.mediawiki.org/wiki/Extension:External_Data
|
|
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
|
|
https://gerrit.wikimedia.org/r/mediawiki/extensions/ExternalData \
|
|
/var/www/html/extensions/ExternalData \
|
|
&& cd /var/www/html/extensions/ExternalData && composer install --no-dev
|
|
|
|
# https://www.mediawiki.org/wiki/Extension:CSS
|
|
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
|
|
https://gerrit.wikimedia.org/r/mediawiki/extensions/CSS \
|
|
/var/www/html/extensions/CSS
|
|
|
|
# https://www.mediawiki.org/wiki/Extension:Variables
|
|
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
|
|
https://gerrit.wikimedia.org/r/mediawiki/extensions/Variables \
|
|
/var/www/html/extensions/Variables
|
|
|
|
RUN a2enmod proxy_http proxy_html
|
|
COPY apache-mediawiki.conf /etc/apache2/sites-available/000-default.conf
|
|
|
|
# reset back to default shell
|
|
SHELL ["/bin/sh", "-c"]
|
|
|
|
# run update script on start
|
|
CMD ["sh", "-c", "(sleep 5; php /var/www/html/maintenance/update.php --quick --quiet) & apache2-foreground"]
|