forked from samdebacker/docker-spotweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (41 loc) · 1.39 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
FROM phusion/baseimage:0.9.15
MAINTAINER Andy Verbunt <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
# Set correct environment variables.
ENV HOME /root
# Use baseimage-docker's init system
CMD ["/sbin/my_init"]
RUN apt-get update -q
# Install packages
RUN apt-get -y install apache2 php5 php5-curl php5-gd php5-gmp php5-mysql
# Add our crontab file
ADD cron.cfg /root/cron.cfg
# Use the crontab file
RUN crontab /root/cron.cfg
# Start cron
RUN cron
# Enable apache mods
RUN a2enmod php5
RUN a2enmod rewrite
# Update the php.ini file
RUN sed -i "s/^;date.timezone =.*/date.timezone = Europe\/Brussels/" /etc/php5/apache2/php.ini
# Install git
RUN apt-get -y install git
# Install spotweb using git
RUN git clone https://github.com/Spotweb/Spotweb.git /var/www/site/spotweb
RUN chmod -R 777 /var/www/site/spotweb
RUN chown -R root:www-data /var/www/site/spotweb
# Update the default apache site with the config we created
ADD apache-config.conf /etc/apache2/sites-enabled/000-default.conf
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
RUN mkdir -p $APACHE_RUN_DIR $APACHE_LOCK_DIR $APACHE_LOG_DIR
EXPOSE 80
# Add apache to runit
RUN mkdir /etc/service/apache
ADD apache.sh /etc/service/apache/run
RUN chmod +x /etc/service/apache/run