forked from istepanov/docker-dokuwiki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (39 loc) · 2.23 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
FROM alpine:3.4
MAINTAINER Ilya Stepanov <dev@ilyastepanov.com>
ENV DOKUWIKI_VERSION 2016-06-26a
ENV MD5_CHECKSUM 9b9ad79421a1bdad9c133e859140f3f2
RUN apk --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ add \
php7 php7-fpm php7-gd php7-session php7-xml nginx supervisor curl tar
RUN mkdir -p /run/nginx && \
mkdir -p /var/www /var/dokuwiki-storage/data && \
cd /var/www && \
curl -O -L "https://download.dokuwiki.org/src/dokuwiki/dokuwiki-$DOKUWIKI_VERSION.tgz" && \
tar -xzf "dokuwiki-$DOKUWIKI_VERSION.tgz" --strip 1 && \
rm "dokuwiki-$DOKUWIKI_VERSION.tgz" && \
mv /var/www/data/pages /var/dokuwiki-storage/data/pages && \
ln -s /var/dokuwiki-storage/data/pages /var/www/data/pages && \
mv /var/www/data/meta /var/dokuwiki-storage/data/meta && \
ln -s /var/dokuwiki-storage/data/meta /var/www/data/meta && \
mv /var/www/data/media /var/dokuwiki-storage/data/media && \
ln -s /var/dokuwiki-storage/data/media /var/www/data/media && \
mv /var/www/data/media_attic /var/dokuwiki-storage/data/media_attic && \
ln -s /var/dokuwiki-storage/data/media_attic /var/www/data/media_attic && \
mv /var/www/data/media_meta /var/dokuwiki-storage/data/media_meta && \
ln -s /var/dokuwiki-storage/data/media_meta /var/www/data/media_meta && \
mv /var/www/data/attic /var/dokuwiki-storage/data/attic && \
ln -s /var/dokuwiki-storage/data/attic /var/www/data/attic && \
mv /var/www/conf /var/dokuwiki-storage/conf && \
ln -s /var/dokuwiki-storage/conf /var/www/conf
ADD nginx.conf /etc/nginx/nginx.conf
ADD supervisord.conf /etc/supervisord.conf
ADD start.sh /start.sh
RUN echo "cgi.fix_pathinfo = 0;" >> /etc/php7/php-fpm.ini && \
sed -i -e "s|;daemonize\s*=\s*yes|daemonize = no|g" /etc/php7/php-fpm.conf && \
sed -i -e "s|listen\s*=\s*127\.0\.0\.1:9000|listen = /var/run/php-fpm7.sock|g" /etc/php7/php-fpm.d/www.conf && \
sed -i -e "s|;listen\.owner\s*=\s*|listen.owner = |g" /etc/php7/php-fpm.d/www.conf && \
sed -i -e "s|;listen\.group\s*=\s*|listen.group = |g" /etc/php7/php-fpm.d/www.conf && \
sed -i -e "s|;listen\.mode\s*=\s*|listen.mode = |g" /etc/php7/php-fpm.d/www.conf && \
chmod +x /start.sh
EXPOSE 80
VOLUME ["/var/dokuwiki-storage"]
CMD /start.sh