-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
58 lines (44 loc) · 1.98 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
FROM php:8.4.1-apache AS builder
WORKDIR /build
RUN curl -O https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz \
&& tar xzf dokuwiki-stable.tgz --strip-components=1 \
&& rm dokuwiki-stable.tgz \
&& curl -L https://github.com/reactivematter/dokuwiki-template-minimal/archive/master.tar.gz -o minimal.tgz \
&& mkdir -p lib/tpl/minimal \
&& tar xzf minimal.tgz --strip-components=1 -C lib/tpl/minimal \
&& rm minimal.tgz
COPY files/ .
FROM php:8.4.1-apache
LABEL maintainer="Eduardo N.S.R. <[email protected]>" \
description="DokuWiki with pre-installed essential plugins and persistent storage support" \
org.opencontainers.image.title="DokuWiki Docker Image" \
org.opencontainers.image.description="DokuWiki with pre-installed essential plugins and persistent storage support" \
org.opencontainers.image.authors="Eduardo N.S.R. <[email protected]>" \
org.opencontainers.image.licenses="AGPL-3.0" \
org.opencontainers.image.url="https://hub.docker.com/r/vndmtrx/dokuwiki" \
org.opencontainers.image.source="https://github.com/vndmtrx/dokuwiki-docker"
RUN apt-get update && apt-get install -y libldap2-dev libzip-dev ldap-utils vim \
&& docker-php-ext-configure ldap \
&& docker-php-ext-install ldap zip \
&& a2enmod rewrite \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& find /var/cache/apt/archives -type f -delete
RUN { \
echo 'output_buffering = 4096'; \
echo 'memory_limit = 256M'; \
echo 'max_execution_time = 60'; \
echo 'upload_max_filesize = 50M'; \
echo 'post_max_size = 50M'; \
} > /usr/local/etc/php/conf.d/dokuwiki.ini
WORKDIR /var/www/html
COPY --from=builder /build/ .
RUN mkdir /dokuwiki \
&& chown -R www-data:www-data . /dokuwiki
COPY init-script.sh /usr/local/bin/init-script.sh
RUN chmod +x /usr/local/bin/init-script.sh
EXPOSE 80
VOLUME ["/dokuwiki"]
USER www-data
ENTRYPOINT ["/usr/local/bin/init-script.sh"]