-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
71 lines (61 loc) · 1.74 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
FROM php:7.3-fpm-alpine
WORKDIR /usr/local/etc
COPY www.conf ./php-fpm.d/
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories; \
apk add --no-cache tzdata; \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime; \
echo "Asia/Shanghai" > /etc/timezone;
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"; \
php -v;
RUN apk upgrade --update \
&& apk add --no-cache --virtual .php-deps \
autoconf \
libc-dev \
make \
musl-dev \
re2c \
bison \
libtool \
zlib-dev \
libmemcached-dev \
libmcrypt-dev \
yaml-dev \
libxml2-dev \
libzip-dev \
icu-dev \
libpng-dev \
libxslt-dev \
&& rm -rf /tmp/* /var/cache/apk/*
RUN apk add --no-cache --virtual .build-deps gcc \
&& pecl install memcached \
&& docker-php-ext-enable memcached \
&& pecl install mcrypt \
&& docker-php-ext-enable mcrypt \
&& pecl install redis \
&& docker-php-ext-enable redis \
&& pecl install yaml \
&& docker-php-ext-enable yaml \
&& pecl install mongodb \
&& docker-php-ext-enable mongodb \
&& pecl install inotify \
&& docker-php-ext-enable inotify \
&& apk del .build-deps gcc \
&& rm -rf /tmp/* /var/cache/apk/*
RUN docker-php-ext-configure intl \
&& docker-php-ext-install -j$(nproc) intl \
&& docker-php-ext-enable intl
RUN docker-php-ext-install -j$(nproc) bcmath \
pdo_mysql \
mysqli \
xmlrpc \
tokenizer \
zip \
opcache \
pcntl \
gd \
soap \
xsl
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"; \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer; \
php -r "unlink('composer-setup.php');";
EXPOSE 9000