-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.fpm
55 lines (49 loc) · 2.01 KB
/
Dockerfile.fpm
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
FROM php:7.0-fpm-alpine
# WORKDIR /var/www/html
# use mirror tsinghua
# RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN apk update \
&& apk add --no-cache gd-dev libpng-dev \
libmcrypt-dev \
libxml2-dev \
imagemagick6-dev \
libmemcached-dev \
libwebp-dev libjpeg-turbo-dev libpng-dev libxpm-dev \
freetype-dev curl-dev \
tzdata \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone
RUN set -xe \
&& apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
&& export CFLAGS="$PHP_CFLAGS" \
CPPFLAGS="$PHP_CPPFLAGS" \
LDFLAGS="$PHP_LDFLAGS" \
&& pecl install redis-4.3.0 \
&& pecl install apcu-5.1.8 \
&& docker-php-ext-install bcmath mcrypt \
mysqli pcntl pdo_mysql shmop soap sockets sysvsem xmlrpc opcache zip \
&& docker-php-ext-configure gd --with-libdir=/usr/include --with-webp-dir=/usr --with-xpm-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-freetype-dir=/usr \
&& docker-php-ext-install gd \
&& pecl install imagick-3.7.0 \
&& docker-php-ext-install mcrypt \
&& pecl install memcached-3.2.0 \
&& pecl install mongodb-1.9.2 \
&& pecl install xdebug-2.8.1 \
&& docker-php-ext-enable redis \
&& docker-php-ext-enable apcu \
&& docker-php-ext-enable gd \
&& docker-php-ext-enable imagick \
&& docker-php-ext-enable memcached \
&& docker-php-ext-enable mongodb \
&& docker-php-ext-enable xdebug \
# Chane TimeZone
&& cp $PHP_INI_DIR/php.ini-development $PHP_INI_DIR/php.ini \
# && cp $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini \
&& sed -i 's/;date.timezone =/date.timezone = "Asia\/Shanghai"/g' $PHP_INI_DIR/php.ini \
&& apk del .build-deps \
&& rm /tmp/* -rf
# install composer
# wget https://getcomposer.org/download/2.1.14/composer.phar
RUN curl -sS https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer