This repository was archived by the owner on Apr 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
70 lines (55 loc) · 1.98 KB
/
Dockerfile
File metadata and controls
70 lines (55 loc) · 1.98 KB
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
68
69
70
# Set the base image to Ubuntu
FROM ubuntu:14.04.1
# File Author / Maintainer
MAINTAINER Martijn <martijn.niji@gmail.com>
# Install basic applications
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get -yq install \
curl \
git-core \
apache2 \
libapache2-mod-php5 \
php5-mysql \
php5-gd \
php5-curl && \
rm -rf /var/lib/apt/lists/*
RUN sed -i "s/variables_order.*/variables_order = \"EGPCS\"/g" /etc/php5/apache2/php.ini
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Turn on rewrite module
RUN a2enmod rewrite
# copy a few things from apache's init script that it requires to be setup
ENV APACHE_CONFDIR /etc/apache2
ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars
# and then a few more from $APACHE_CONFDIR/envvars itself
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_PID_FILE $APACHE_RUN_DIR/apache2.pid
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_LOG_DIR /var/log/apache2
ENV LANG C
RUN mkdir -p $APACHE_RUN_DIR $APACHE_LOCK_DIR $APACHE_LOG_DIR
# make CustomLog (access log) go to stdout instead of files
# and ErrorLog to stderr
RUN find "$APACHE_CONFDIR" -type f -exec sed -ri ' \
s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \
s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \
' '{}' ';'
# Create document root
RUN rm -rf /var/www/html && mkdir -p /var/www/html
# Set the default directory where CMD will execute
WORKDIR /var/www/html
# git clone checks out to /var/www/html/wolfcms
RUN git clone https://github.com/wolfcms/wolfcms.git
# Mount an external volume for /var/www/html/wolfcms/public
#VOLUME /var/www/html
# Create Apache vhost and enable is
COPY docker-apache.conf /etc/apache2/sites-available/wolfcms.conf
RUN a2dissite 000-default && a2ensite wolfcms
# Expose ports
EXPOSE 80
#COPY docker-entrypoint.sh /entrypoint.sh
#ENTRYPOINT ["/entrypoint.sh"]
# Run Apache
CMD ["apache2", "-DFOREGROUND"]