Skip to content
Dockerfile 1.36 KiB
Newer Older
Seblu's avatar
Seblu committed
FROM php:7-apache

MAINTAINER Sébastien Luttringer <seblu@seblu.net>

Seblu's avatar
Seblu committed
ENV DOKUWIKI_VERSION 2018-04-22c
Seblu's avatar
Seblu committed

RUN apt-get update \
 && apt-get dist-upgrade -y \
 && apt-get install -y --no-install-recommends libfreetype6-dev libjpeg62-turbo-dev libpng-dev \
 && rm -rf /var/lib/apt/lists/* \
 && rm -rf /var/cache/apt/* \
Seblu's avatar
Seblu committed
 && docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \
Seblu's avatar
Seblu committed
 && docker-php-ext-install -j$(nproc) gd \
 && a2enmod rewrite \
 && sed -i 's/^ServerSignature .*/ServerSignature Off/' /etc/apache2/conf-available/security.conf \
 && sed -i 's/^ServerTokens .*/ServerTokens Minimal/' /etc/apache2/conf-available/security.conf \
 && curl -sL https://github.com/splitbrain/dokuwiki/archive/release_stable_$DOKUWIKI_VERSION.tar.gz \
    | tar xz -C /var/www/html --strip-components=1 \
 && cp /var/www/html/.htaccess.dist /var/www/html/conf/apache.conf \
 && ln -s conf/apache.conf /var/www/html/.htaccess \
 && chown -R www-data:www-data /var/www/html \
 && mv /var/www/html/.htaccess.dist /var/www/html/conf/apache.conf \
 && mkdir /usr/share/dokuwiki \
 && mv /var/www/html/lib/plugins /var/www/html/lib/tpl /usr/share/dokuwiki \
 && true
Seblu's avatar
Seblu committed

COPY entrypoint.sh /usr/local/bin
ENTRYPOINT ["entrypoint.sh"]
CMD ["apache2-foreground"]
Seblu's avatar
Seblu committed
VOLUME ["/var/www/html/data/","/var/www/html/lib/plugins/","/var/www/html/conf/","/var/www/html/lib/tpl/"]
Seblu's avatar
Seblu committed
EXPOSE 80/tcp