forked from wikimedia/mediawiki-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (51 loc) · 1.62 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
49
50
51
52
53
54
55
56
57
58
59
FROM debian:sid
MAINTAINER Gabriel Wicke <gwicke@wikimedia.org>
# Waiting in antiticipation for built-time arguments
# https://github.com/docker/docker/issues/14634
ENV MEDIAWIKI_VERSION wmf/1.27.0-wmf.9
# XXX: Consider switching to nginx.
RUN set -x; \
apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
apache2 \
libapache2-mod-php5 \
php5-mysql \
php5-cli \
php5-gd \
php5-curl \
imagemagick \
netcat \
git \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/cache/apt/archives/* \
&& a2enmod rewrite \
&& a2enmod proxy \
&& a2enmod proxy_http \
# Remove the default Debian index page.
&& rm /var/www/html/index.html
# MediaWiki setup
RUN set -x; \
mkdir -p /usr/src \
&& git clone \
--depth 1 \
-b $MEDIAWIKI_VERSION \
https://gerrit.wikimedia.org/r/p/mediawiki/core.git \
/usr/src/mediawiki \
&& cd /usr/src/mediawiki \
&& git submodule update --init skins \
&& git submodule update --init vendor \
&& cd extensions \
# VisualEditor
# TODO: make submodules shallow clones?
&& git submodule update --init VisualEditor \
&& cd VisualEditor \
&& git checkout $MEDIAWIKI_VERSION \
&& git submodule update --init
COPY php.ini /usr/local/etc/php/conf.d/mediawiki.ini
COPY apache/mediawiki.conf /etc/apache2/
RUN echo "Include /etc/apache2/mediawiki.conf" >> /etc/apache2/apache2.conf
COPY docker-entrypoint.sh /entrypoint.sh
EXPOSE 80 443
ENTRYPOINT ["/entrypoint.sh"]
CMD ["apachectl", "-e", "info", "-D", "FOREGROUND"]