-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile-apache2
More file actions
43 lines (30 loc) · 1.49 KB
/
Dockerfile-apache2
File metadata and controls
43 lines (30 loc) · 1.49 KB
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
FROM php:5.6-apache
## REPLACE "webserver.domain.xx"
RUN echo "postfix postfix/mailname string webserver.domain.xx" | debconf-set-selections
RUN echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections
RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y postfix nano wget libpng-dev mapserver-bin gdal-bin cron libfreetype6-dev libjpeg-dev libxpm-dev
# Copy PHP configuration
# Edit docker/php.ini and customize it to your needs
ADD confs/php/apache2/php.ini /usr/local/etc/php/php.ini
# Install PHP extensions
RUN docker-php-ext-install mysql
RUN docker-php-ext-install mysqli
RUN docker-php-ext-install pdo
RUN docker-php-ext-install pdo_mysql
RUN docker-php-ext-configure gd --with-gd --with-webp-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf
RUN docker-php-ext-install gd
ADD confs/apache2/sites-available /etc/apache2/sites-available
ADD confs/apache2/conf-available /etc/apache2/conf-available
# Enable new site
RUN a2enmod rewrite ssl headers cgid
RUN mkdir -p /var/www/drupal
RUN a2ensite 000-default.conf default-ssl.conf
RUN apache2ctl restart
RUN mkfifo /var/spool/postfix/public/pickup
ADD confs/cron/guifimaps-cron /etc/cron.d/guifimaps
RUN chmod 0644 /etc/cron.d/guifimaps
# Change CMD to have cron running
RUN echo "#!/bin/sh\ncron\n/usr/local/bin/apache2-foreground" > /usr/bin/run
RUN chmod u+x /usr/bin/run
CMD ["run"]
ADD confs/guifimaps/refresh.php /var/www/guifimaps/refresh.php