-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
67 lines (53 loc) · 1.5 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
60
61
62
63
64
65
66
67
FROM ubuntu:16.04
# Update Operating System
RUN \
apt-get update && \
apt-get upgrade -y && \
apt-get clean
# Install Dependencies ( and busybox for vi )
RUN \
apt-get install -y \
busybox \
nginx \
php7.0 \
php7.0-gd \
php7.0-ldap \
php7.0-sqlite3 \
php7.0-xml \
php7.0-zip \
wget && \
apt-get clean
# Make an alias for vi
RUN echo "alias vi='busybox vi'" >> /root/.bashrc
# Dokuwiki version build argument
ARG DOKUWIKI_VERSION=2018-04-22c
ENV DOKUWIKI_VERSION=$DOKUWIKI_VERSION
# Download Dokuwiki
RUN \
cd /var/www/html && \
wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-${DOKUWIKI_VERSION}.tgz && \
tar -xf dokuwiki-${DOKUWIKI_VERSION}.tgz && \
rm dokuwiki-${DOKUWIKI_VERSION}.tgz && \
mv dokuwiki-*/* . && \
rm -rf dokuwiki-*/ && \
chown -R www-data .
# Copy in our nginx config
COPY nginx.conf /etc/nginx/nginx.conf
# Remove the default nginx configuration
RUN rm /etc/nginx/sites-enabled/default
# Add our nginx configuration
COPY dokuwiki-site /etc/nginx/sites-enabled/dokuwiki-site
# Add our php configuration
COPY php.ini /etc/php/7.0/fpm/php.ini
# Make the PHP run dir
RUN mkdir -p /run/php
# Copy in our container-start and container-start scripts
COPY start-container.sh /start-container.sh
RUN chmod 744 /start-container.sh
COPY stop-container.sh /stop-container.sh
RUN chmod 744 /stop-container.sh
# Copy in our docker-cmd script
COPY docker-cmd.sh /docker-cmd.sh
RUN chmod 744 /docker-cmd.sh
# Set the Docker command
CMD ["/docker-cmd.sh"]