forked from factorysh/docker-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.7.0
56 lines (47 loc) · 1.5 KB
/
Dockerfile.7.0
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
FROM bearstech/php-cli:7.0
ENV PHP_VERSION 7.0
USER root
RUN set -eux \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
php-memcached \
php-xdebug \
php7.0-curl \
php7.0-fpm \
php7.0-gd \
php7.0-json \
php7.0-mbstring \
php7.0-mysql \
php7.0-xml \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& phpdismod \
ftp \
shmop \
wddx \
xdebug \
zip \
&& phpenmod \
msgpack \
&& mkdir /var/log/php \
&& ln -sf /proc/1/fd/2 /var/log/php/php7.0-fpm.log \
&& ln -sf /proc/1/fd/2 /var/log/php/www.error.log \
&& ln -sf /proc/1/fd/1 /var/log/php/www.access.log \
&& ln -sf /dev/null /var/log/php/www.slow.log \
&& ln -sf /proc/1/fd/2 /var/log/msmtp.log
COPY conf/www.conf /etc/php/7.0/fpm/pool.d/www.conf
COPY conf/php-fpm.conf /etc/php/7.0/fpm/php-fpm.conf
RUN set -eux \
&& chmod 700 /etc/php/7.0/fpm/pool.d \
&& chmod 600 /etc/php/7.0/fpm/pool.d/www.conf \
&& chown -R www-data /etc/php/7.0/fpm/pool.d \
&& touch /etc/msmtprc \
&& chown www-data /etc/msmtprc \
&& chmod 640 /etc/msmtprc
LABEL sh.factory.probe.fpm.path=/__path
EXPOSE 9000
COPY entrypoint.sh /usr/local/bin/
USER www-data
ENTRYPOINT ["entrypoint.sh"]
CMD ["/usr/sbin/php-fpm7.0"]