-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
96 lines (83 loc) · 2.24 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
FROM debian:wheezy
# Add Environment var
ENV DOCUMENT_ROOT /var/www \
ENVIRONMENT dev \
SSMTP_SERVER mailhog \
SSMTP_PORT 1025
# Running nano in docker container
ENV TERM xterm
RUN \
apt-get update && \
apt-get install -y \
ssmtp \
curl \
wget \
nano \
git \
unzip \
locales \
iptables \
apache2 \
php5 \
php5-mysql \
php5-mcrypt \
php5-gd \
php5-memcached \
php5-memcache \
php5-curl \
php-pear \
php-apc \
php5-cli \
php5-curl \
php5-mcrypt \
php5-sqlite \
php5-intl \
php5-tidy \
php5-imap \
php5-json \
php5-imagick \
libapache2-mod-php5 && \
a2enmod proxy && \
a2enmod proxy_http && \
a2enmod alias && \
a2enmod dir && \
a2enmod env && \
a2enmod mime && \
a2enmod reqtimeout && \
a2enmod rewrite && \
a2enmod status && \
a2enmod filter && \
a2enmod deflate && \
a2enmod setenvif && \
a2enmod vhost_alias && \
a2enmod ssl && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists
# Install Composer
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
&& curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \
&& php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }"
RUN php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer \
&& rm /tmp/composer-setup.php \
&& chmod +x /usr/local/bin/composer
# Configure timezone
RUN echo Europe/Rome > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata
RUN { echo 'en_GB ISO-8859-1'; \
echo 'en_GB.ISO-8859-15 ISO-8859-15'; \
echo 'en_US ISO-8859-1'; \
echo 'en_US.ISO-8859-15 ISO-8859-15'; \
echo 'en_US.UTF-8 UTF-8'; \
} >> /etc/locale.gen && usr/sbin/locale-gen
RUN ln -sf /dev/stderr /var/log/apache2/error.log
COPY httpd/dummy.crt /etc/ssl/crt/dummy.crt
COPY httpd/dummy.key /etc/ssl/crt/dummy.key
COPY httpd/default.conf /etc/apache2/sites-available/default
COPY httpd/php.ini /etc/php5/apache2/conf.d/
COPY httpd/php.ini /etc/php5/cli/conf.d/
COPY run.sh /run.sh
RUN chmod +x /run.sh
EXPOSE 80
EXPOSE 443
WORKDIR /var/www
CMD ["/run.sh"]