forked from catchpoint/WebPageTest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
81 lines (68 loc) · 2.55 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
FROM php:5.6-apache
MAINTAINER iteratec WPT Team <[email protected]>
ENV PATH=$PATH:/scripts
RUN echo deb http://www.deb-multimedia.org jessie main non-free >> /etc/apt/sources.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -q -y --force-yes \
deb-multimedia-keyring \
imagemagick \
libjpeg-progs \
exiftool \
unzip \
wget \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng12-dev \
libcurl4-openssl-dev \
python \
python-pillow \
cron \
supervisor && \
\
DEBIAN_FRONTEND=noninteractive apt-get install -q -y --force-yes\
ffmpeg && \
apt-get clean && \
apt-get autoclean
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
docker-php-ext-install gd && \
docker-php-ext-install zip && \
docker-php-ext-install curl && \
a2enmod expires headers rewrite
RUN apt-get install -y libmagickwand-6.q16-dev --no-install-recommends && \
ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/MagickWand-config /usr/bin && \
pecl install imagick && \
echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini
COPY www /var/www/html
RUN chown -R www-data:www-data /var/www/html && \
cd /var/www/html && \
chmod 0777 dat && \
chmod 0777 -R work && \
chmod 0777 logs && \
mkdir -p results && \
chmod 0777 -R results && \
\
cd /var/www/html/settings && \
mv settings.ini.sample settings.ini && \
mv connectivity.ini.sample connectivity.ini && \
\
mkdir -p /var/log/supervisor && \
mkdir -p /scripts/settings
COPY docker/server/config/locations.ini /var/www/html/settings/locations.ini
COPY docker/server/config/php.ini /usr/local/etc/php/
COPY docker/server/config/apache2.conf /etc/apache2/apache2.conf
COPY docker/server/config/crontab /etc/crontab
# config supervisor
COPY docker/server/config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY docker/server/config/supervisord/supervisord_apache.conf /etc/supervisor/conf.d/supervisord_apache.conf
COPY docker/server/config/supervisord/supervisord_cron.conf /etc/supervisor/conf.d/supervisord_cron.conf
# Copy scripts
COPY docker/server/scripts/migrate-settings /scripts/migrate-settings
COPY docker/server/scripts/start_archiving.sh /scripts/start_archiving.sh
# Set execution bit
RUN chmod +x /scripts/migrate-settings && \
chmod +x /scripts/start_archiving.sh
VOLUME /var/www/html/settings
VOLUME /var/www/html/results
VOLUME /var/www/html/logs
EXPOSE 80 443
CMD ["/usr/bin/supervisord"]