-
Notifications
You must be signed in to change notification settings - Fork 715
/
Dockerfile
84 lines (69 loc) · 2.72 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
FROM php:7.4-apache
MAINTAINER iteratec WPT Team <[email protected]>
RUN chmod o+r /etc/resolv.conf
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -q -y --allow-unauthenticated \
imagemagick \
libjpeg-progs \
exiftool \
unzip \
wget \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libcurl4-openssl-dev \
python \
python-pillow \
cron \
beanstalkd \
supervisor && \
\
DEBIAN_FRONTEND=noninteractive apt-get install -q -y --allow-downgrades --allow-change-held-packages \
ffmpeg && \
apt-get clean && \
apt-get autoclean
RUN apt-get install libzip-dev -y
RUN docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/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
COPY docker/server/config/locations.ini /var/www/html/settings/locations.ini
COPY docker/server/config/php.ini /usr/local/etc/php/
RUN pear config-set php_ini /usr/local/etc/php/php.ini
COPY docker/server/config/apache2.conf /etc/apache2/apache2.conf
COPY docker/server/config/crontab /etc/crontab
# config supervisor to run apache, cron, beanstalkd, ec2init
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 docker/server/config/supervisord/supervisord_beanstalkd.conf /etc/supervisor/conf.d/supervisord_beanstalkd.conf
COPY docker/server/config/supervisord/supervisord_ec2init.conf /etc/supervisor/conf.d/supervisord_ec2init.conf
# copy WPT scripts, set executable and create crontab
COPY docker/server/scripts/ /scripts/
RUN chmod 755 /scripts/* && \
crontab /etc/crontab
VOLUME /var/www/html/settings
VOLUME /var/www/html/results
VOLUME /var/www/html/logs
EXPOSE 80 443
CMD ["/usr/bin/supervisord"]