-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
103 lines (93 loc) · 2.16 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
FROM php:7.3-fpm
MAINTAINER leli<[email protected]>
ENV PHPIZE_DEPS \
autoconf \
file \
g++ \
gcc \
make \
pkg-config \
wget \
git \
vim \
yum \
# crontab
cron \
# netstat ifconfig
net-tools \
# ping
iputils-ping \
# ps
procps \
# telnet
telnet \
htop
RUN apt-get update && apt-get install -y \
$PHPIZE_DEPS \
--no-install-recommends && \
rm -r /var/lib/apt/lists/*
RUN set -ex; \
\
apt-get update; \
apt-get install -y --allow-unauthenticated \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libmemcached-dev \
libsqlite3-dev \
libxpm-dev \
libzip-dev \
zip \
libgearman-dev \
libcurl4-openssl-dev && \
docker-php-ext-configure gd \
--with-freetype-dir=/usr/include/ \
--with-png-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ \
--with-xpm-dir=/usr/include/ && \
docker-php-ext-configure zip --with-libzip && \
docker-php-ext-install \
gd \
bcmath \
pcntl \
mysqli \
pdo_mysql \
opcache \
sockets \
zip && \
# pecl install
pecl install \
memcached-3.0.4 \
redis \
msgpack-2.0.2 \
mcrypt-1.0.1 \
mongodb \
swoole-4.0.4 && \
docker-php-ext-enable \
memcached \
redis \
msgpack \
mcrypt \
mongodb \
swoole && \
docker-php-source delete && \
pecl clear-cache && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/apk/*
# install gearman
RUN cd /tmp && \
git clone https://github.com/MS100/pecl-gearman.git && \
cd pecl-gearman && \
phpize && \
./configure && \
make && make install && \
rm -rf /tmp/pecl-gearman
RUN docker-php-ext-enable gearman.so && \
mkdir -p ${HOME}/php-default-conf && \
cp -R /usr/local/etc/* ${HOME}/php-default-conf
RUN mkdir -p /opt/log && chmod 777 /opt/log
# chown -R nobody:nobody /opt/log
WORKDIR /opt/wwwroot
# EXPOSE 9000
CMD ["php-fpm"]