forked from CastawayLabs/lamp-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·57 lines (44 loc) · 1.59 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
FROM ubuntu:latest
MAINTAINER Matej Kramny <matej@matej.me>
RUN apt-get update
RUN apt-get install -y apache2 php-pear php5-curl php5-mysql php5-odbc php5-imagick php5-mcrypt mysql-client curl git postfix libsasl2-modules rsyslog python-setuptools libapache2-mod-php5 php5-imap
RUN apt-get install -y imagemagick php5-imagick php5-gd php5-dev
RUN pear install Mail Mail_Mime Net_SMTP Net_Socket Spreadsheet_Excel_Writer XML_RPC
RUN php5enmod mcrypt
RUN apt-get install -y supervisor
RUN mkdir -p /var/log/supervisor
RUN a2enmod rewrite
RUN a2enmod php5
RUN rm -f /etc/apache2/sites-enabled/000-default.conf
WORKDIR /tmp
RUN git clone git://github.com/phpredis/phpredis.git
WORKDIR phpredis
RUN phpize
RUN ./configure
RUN make && make install
ADD conf/supervisord.conf /etc/supervisor/supervisord.conf
ADD conf/website.conf /etc/apache2/conf.d/website.conf
ADD conf/httpd.conf /etc/apache2/apache2.conf
ADD conf/php.ini /etc/php5/apache2/php.ini
ADD conf/postfix.cf /etc/postfix/main.cf
ADD conf/sasl_passwd /etc/postfix/sasl_passwd
ADD conf/rsyslog.conf /etc/rsyslog.conf
ADD conf/lamp.sh /etc/lamp.sh
RUN chmod +x /etc/lamp.sh
RUN chown -R root:root /etc/postfix
RUN chmod 600 /etc/postfix/sasl_passwd
RUN postmap /etc/postfix/sasl_passwd
# Maybe a fix for some errors..
RUN chmod o+rwx /var/spool/postfix/maildrop
RUN chmod o+x /var/spool/postfix/public
# Fix session write warnings
RUN chown www-data:www-data /var/lib/php5
RUN chmod g+rwx /var/lib/php5
RUN apachectl configtest
RUN rm -rf /var/www
RUN service apache2 stop
RUN service postfix stop
RUN service rsyslog stop
EXPOSE 80
EXPOSE 443
CMD ["/etc/lamp.sh"]