# 时区同步
&& apk add --no-cache tzdata \\
&& ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
&& echo "${TIMEZONE}" > /etc/timezone \
# php基本扩展
&& apk add --no-cache libxml2-dev && docker-php-ext-install -j$(nproc) dom \
&& apk add --no-cache curl-dev && docker-php-ext-install -j$(nproc) curl \
&& apk add --no-cache libpng-dev && docker-php-ext-install -j$(nproc) gd \
&& apk add --no-cache icu-dev && docker-php-ext-install -j$(nproc) intl \
&& apk add --no-cache libedit-dev && docker-php-ext-install -j$(nproc) readline \
&& apk add --no-cache libzip-dev && docker-php-ext-install -j$(nproc) bz2 zip \
&& docker-php-ext-install -j$(nproc) pdo pdo_mysql mysqli iconv json mbstring opcache pcntl session sockets xml xmlreader xmlwriter soap opcache mysqli mysql pdo_mysql \
# 编译工具
&& apk add --no-cache --virtual .build-deps autoconf make g++ libtool pcre-dev\
# memcache 扩展
&& apk add --no-cache zlib zlib-dev\
&& pecl install memcache\
&& docker-php-ext-enable memcache \
# memcached 扩展
&& apk add --no-cache zlib zlib-dev libmemcached libmemcached-dev cyrus-sasl-dev\
&& pecl install memcached-2.2.0\ #php5用2.x php7 用3.x
&& docker-php-ext-enable memcached \
# redis扩展
&& pecl install redis \
&& docker-php-ext-enable redis \
# composer 安装
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php \
&& php -r "unlink('composer-setup.php');" \
&& mv composer.phar /usr/local/bin/composer \
&& chmod 755 /usr/local/bin/composer \
&& composer config -g repo.packagist composer https://packagist.phpcomposer.com \
# 清理
&& apk del .build-deps \
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/* /usr/share/doc/*