This repository was archived by the owner on Oct 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·78 lines (70 loc) · 3.15 KB
/
Dockerfile
File metadata and controls
executable file
·78 lines (70 loc) · 3.15 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
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
FROM php:7.2-apache
ARG DEBIAN_FRONTEND=noninteractive
ENV LETSENCRYPT_HOME /etc/letsencrypt
RUN echo 'deb http://ftp.debian.org/debian jessie-backports main' >> /etc/apt/sources.list \
&& curl -sS http://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y --fix-missing \
apt-utils \
git \
vim \
libpng12-dev \
libjpeg-dev \
libpq-dev \
mysql-client \
libnotify-bin \
sendmail \
rsyslog \
gcc \
make \
autoconf \
libc-dev \
libpcre3-dev \
pkg-config \
supervisor \
libxml2-dev \
&& apt-get install -y build-essential patch \
# https://github.com/docker-library/php/issues/105#issuecomment-196273150
&& apt-get install -y libmagickwand-dev --no-install-recommends \
&& mkdir -p /var/log/supervisor \
&& pecl install imagick \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd mbstring opcache pdo pdo_mysql zip bcmath pcntl mysqli soap \
&& docker-php-ext-enable imagick \
&& a2enmod rewrite headers expires ssl actions \
&& apt-get install -y python-certbot-apache -t jessie-backports \
&& curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g gulp bower \
&& apt-get install yarn \
&& pear install -a Mail_Mime \
&& pear install Mail_mimeDecode \
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& composer global require "hirak/prestissimo:^0.3" \
&& chmod -R 755 /var/www/html \
&& chown -R www-data:www-data /var/www/html \
&& chmod -R 644 /etc/cron.d/* \
&& chown -R root:root /etc/cron.d/* \
&& echo 'sendmail_path = /usr/sbin/sendmail -t -i' >> /usr/local/etc/php/conf.d/sendmail.ini \
#&& echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections \
#&& echo "postfix postfix/mailname string $(hostname -f)" | debconf-set-selections \
#&& apt-get install -y postfix \
#&& postconf -e "inet_interfaces = loopback-only" \
#&& postconf -e "debug_peer_level = 2" \
&& apt-get autoclean -y \
&& apt-get clean -y \
&& apt-get autoremove -y
#COPY config/cron/drupal /etc/cron.d/
#RUN chmod 644 /etc/cron.d/*
COPY config/php.ini /usr/local/etc/php
RUN ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log"
COPY config/supervisord.conf /etc/supervisor/supervisord.conf
COPY config/scripts/pmg-* /usr/local/bin/
RUN chmod +x /usr/local/bin/pmg-*
ENV TZ=America/Chicago
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
WORKDIR /var/www
CMD ["/usr/bin/supervisord"]