-
Notifications
You must be signed in to change notification settings - Fork 32
/
Dockerfile
49 lines (38 loc) · 1.58 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
FROM ubuntu:14.04
# Install the packages we need
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y php5-cli git php5-mcrypt php5-curl apache2 libapache2-mod-php5 mysql-server php5-mysql memcached php5-memcache php5-mcrypt && \
apt-get autoremove && \
apt-get clean && apt-get autoclean
# Turn on the mcrypt php module and the rewrite\ssl apache modules
RUN php5enmod mcrypt && \
a2enmod rewrite && \
a2enmod ssl
# TODO: Proper ssl certs via letsencrypt or something
# Configure our path for where we'll serve source-code from
WORKDIR /mnt/flamework
COPY tests/docker/001-flamework.conf /etc/apache2/sites-available/
RUN a2ensite 001-flamework
RUN a2dissite 000-default
RUN rm -rf /var/www/html
RUN ln -fs /mnt/flamework/www /var/www/html
# TODO: PHPUnit via Pear is dead. Also, conditionally install only when running tests?
#RUN apt-get install -y php-pear
#RUN pear channel-discover pear.phpunit.de
#RUN pear install phpunit/PHP_CodeCoverage
# TODO: Only install when running tests?
#RUN apt-get install -y make
#RUN pecl install xdebug
#RUN echo "zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so" > /etc/php5/conf.d/xdebug.ini
# Allow mounting of source code from external to the container
VOLUME ["/mnt/flamework"]
# Optional persistence of the mysql data
VOLUME ["/var/lib/mysql"]
# Listen on the HTTP and HTTPS ports
EXPOSE 80
EXPOSE 443
# When the container is run, this script will start mysql and apache,
# and put a sample config in place if necessary
ENTRYPOINT [ "/bin/bash", "tests/docker/entrypoint.sh" ]