This repository has been archived on 2024-06-01. You can view files and clone it, but cannot push or open issues or pull requests.
docker-mediawiki/Dockerfile

30 lines
2.1 KiB
Docker
Raw Normal View History

2022-12-02 21:14:14 +02:00
FROM mediawiki:latest AS base
ENV DEBIAN_FRONTEND="noninteractive"
COPY ./config.json /tmp/config.json
COPY ./build /tmp
2022-12-30 13:49:41 +02:00
RUN apt update && apt install --yes wget gpg \
&& wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | tee /etc/apt/sources.list.d/elastic-8.x.list \
&& apt update && apt install elasticsearch
# download extensions
RUN apt install wget \
2024-03-25 12:15:33 +02:00
&& wget -P /tmp/mediawiki_extensions https://extdist.wmflabs.org/dist/extensions/AdvancedSearch-REL1_41-5c70291.tar.gz \
&& wget -P /tmp/mediawiki_extensions https://extdist.wmflabs.org/dist/extensions/CirrusSearch-REL1_41-f304f9a.tar.gz \
&& wget -P /tmp/mediawiki_extensions https://extdist.wmflabs.org/dist/extensions/DynamicSidebar-REL1_41-1414e53.tar.gz \
&& wget -P /tmp/mediawiki_extensions https://extdist.wmflabs.org/dist/extensions/Elastica-REL1_41-24f94b8.tar.gz \
&& wget -P /tmp/mediawiki_extensions https://extdist.wmflabs.org/dist/extensions/MobileFrontend-REL1_41-7fb22bf.tar.gz \
#&& wget -P /tmp/mediawiki_extensions https://extdist.wmflabs.org/dist/extensions/Mpdf-REL1_41-4bad605.tar.gz \
&& wget -P /tmp/mediawiki_extensions https://extdist.wmflabs.org/dist/extensions/Popups-REL1_41-462c3c0.tar.gz \
&& wget -P /tmp/mediawiki_extensions https://extdist.wmflabs.org/dist/extensions/TimedMediaHandler-REL1_41-125eade.tar.gz \
&& wget -P /tmp/mediawiki_extensions https://extdist.wmflabs.org/dist/extensions/UserFunctions-REL1_41-4dee0d1.tar.gz
2022-12-02 21:14:14 +02:00
RUN find /tmp/mediawiki_extensions -name "*.tar.gz" -exec sh -c 'tar -xzf {} -C /var/www/html/extensions' \; \
&& find /tmp/mediawiki_skins -name "*.tar.gz" -exec sh -c 'tar -xzf {} -C /var/www/html/skins' \; \
&& find /tmp/mediawiki_override -type f -exec php /tmp/scripts/config_placeholder_replace.php "/tmp/config.json" "{}" \; \
2022-12-30 13:49:41 +02:00
&& cp -R /tmp/mediawiki_override/* /var/www/html \
&& chown www-data:www-data /var/www/html/extensions/ -R \
&& rm -R /tmp/*