-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathDockerfile
executable file
·89 lines (83 loc) · 2.51 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
85
86
87
88
89
ARG ALPINE_VERSION=3.14
FROM alpine:${ALPINE_VERSION}
LABEL maintainer="Thomas Spicer ([email protected])"
ARG ALPINE_VERSION
ENV VAR_PREFIX=/var/run
ENV LOG_PREFIX=/var/log/php-fpm
ENV TEMP_PREFIX=/tmp
ENV CACHE_PREFIX=/var/cache
RUN set -x \
#&& addgroup -g 82 -S www-data \
&& adduser -u 82 -D -S -h /var/cache/php-fpm -s /sbin/nologin -G www-data www-data \
&& apk add --no-cache --virtual .build-deps \
wget \
linux-headers \
curl \
unzip \
&& echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
&& apk add --no-cache --update \
php7@community \
php7-dev@community \
php7-bcmath@community \
php7-dom@community \
php7-common@community \
php7-ctype@community \
php7-cli@community \
php7-curl@community \
php7-fileinfo@community \
php7-fpm@community \
php7-gettext@community \
php7-gd@community \
php7-iconv@community \
php7-json@community \
php7-mbstring@community \
php7-mcrypt@community \
php7-mysqli@community \
php7-mysqlnd@community \
php7-opcache@community \
php7-odbc@community \
php7-pdo@community \
php7-pdo_mysql@community \
php7-pdo_pgsql@community \
php7-pdo_sqlite@community \
php7-phar@community \
php7-posix@community \
php7-redis@community \
php7-session@community \
php7-simplexml@community \
php7-soap@community \
php7-tokenizer@community \
php7-xml@community \
php7-xmlreader@community \
php7-xmlwriter@community \
php7-simplexml@community \
php7-zip@community \
php7-zlib@community \
php7-exif@community \
php7-pecl-imagick@community \
mysql-client\
curl \
monit \
bash \
xz \
openssl \
icu-libs \
ca-certificates \
libxml2-dev \
tar \
&& mkdir -p /var/run \
&& mkdir -p ${LOG_PREFIX} \
&& rm -rf /tmp/* \
&& rm -rf /var/cache/apk/* \
&& touch ${LOG_PREFIX}/access.log \
&& touch ${LOG_PREFIX}/error.log \
&& ln -sf /dev/stdout ${LOG_PREFIX}/access.log \
&& ln -sf /dev/stderr ${LOG_PREFIX}/error.log
COPY conf/monit/ /etc/monit.d/
COPY docker-entrypoint.sh /docker-entrypoint.sh
COPY check_wwwdata.sh /usr/bin/check_wwwdata
COPY check_folder.sh /usr/bin/check_folder
EXPOSE 9000
RUN chmod +x /docker-entrypoint.sh /usr/bin/check_wwwdata /usr/bin/check_folder
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["php-fpm7", "-g", "/var/run/php-fpm.pid"]