-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
44 lines (35 loc) · 1.49 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
FROM debian:jessie
MAINTAINER Andrew Cutler <[email protected]>
EXPOSE 80 443
ENV ROUNDCUBE_VERSION 1.2.7
RUN apt-get update && \
# Nice to have
apt-get install -y vim && \
# Install Requirements
apt-get install -y apache2-mpm-prefork ca-certificates && \
apt-get install -y php5 php-pear php5-mysql php5-pgsql php5-sqlite php5-mcrypt php5-intl php5-ldap && \
# Install Pear Requirements
pear install mail_mime mail_mimedecode net_smtp net_idna2-beta auth_sasl net_sieve crypt_gpg && \
# Cleanup
rm -rf /var/lib/apt/lists/*
# Host Configuration
COPY apache2.conf /etc/apache2/apache2.conf
COPY mpm_prefork.conf /etc/apache2/mods-available/
RUN rm /etc/apache2/conf-enabled/* /etc/apache2/sites-enabled/* && \
a2enmod mpm_prefork deflate rewrite expires headers php5
# Install Code from Git
RUN apt-get update && \
apt-get install -y git && \
rm -rf /var/www/html/* && \
cd /var/www/html && git clone https://github.com/roundcube/roundcubemail.git . && \
git checkout tags/$ROUNDCUBE_VERSION && rm -rf installer .git && \
# Cleanup
apt-get remove -y git && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*
# App Configuration
RUN . /etc/apache2/envvars && chown -R ${APACHE_RUN_USER}:${APACHE_RUN_GROUP} /var/www/html/temp /var/www/html/logs
COPY config.inc.php /var/www/html/config/config.inc.php
# Add bootstrap tool
ADD bootstrap.php /
ADD entry.sh /
ENTRYPOINT ["/entry.sh"]
CMD [ "/usr/sbin/apache2ctl", "-D", "FOREGROUND", "-k", "start" ]