forked from ClickAndMortar/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (33 loc) · 1.77 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
FROM debian:jessie
# Heavily inspired by CenturyLinkLabs Dockerfiles
MAINTAINER Click & Mortar <contact@clickandmortar.fr>
# Install packages
RUN LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get update && \
LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get -y install ca-certificates curl git netcat supervisor tar vim wget && \
LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get -y install apache2 libapache2-mod-php5 php5-mysql php5-intl php5-mcrypt php5-gd php-pear php-apc php5-apcu php5-xsl php5-cli php5-curl && \
LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get autoremove -y && apt-get clean && rm -r /var/lib/apt/lists/* && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# PHP configuration
RUN sed -i "s/;date.timezone =.*/date.timezone = UTC/" /etc/php5/apache2/php.ini /etc/php5/cli/php.ini && \
sed -i -e 's/post_max_size = 8M/post_max_size = 16M/g' \
-e 's/upload_max_filesize = 2M/upload_max_filesize = 16M/g' \
-e 's/error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT/error_reporting = E_ALL/g' \
-e 's/display_errors = Off/display_errors = On/' \
-e "s/max_execution_time = 30/max_execution_time = 300/" \
-e "s/max_input_time = 60/max_input_time = 300/" \
-e "s/memory_limit = 128M/memory_limit = 1024M/" /etc/php5/apache2/php.ini
# Override default Apache conf
ADD apache-vhost.conf /etc/apache2/sites-available/000-default.conf
# Enable Apache rewrite & ssl modules
RUN a2enmod rewrite
# Add image configuration and scripts
ADD apache2.sh /apache2.sh
ADD entrypoint.sh /entrypoint.sh
RUN chmod 755 /*.sh
ADD supervisord-apache2.conf /etc/supervisor/conf.d/supervisord-apache2.conf
# Expose HTTP
EXPOSE 80
# Share Apache DocumentRoot
VOLUME ["/var/www"]
WORKDIR /var/www
CMD ["/entrypoint.sh"]