代码拉取完成,页面将自动刷新
FROM php:7.2-fpm-alpine3.7
RUN set -xe; \
# cp /etc/apk/repositories /etc/apk/repositories.bak; \
# echo "http://mirrors.aliyun.com/alpine/v3.7/main/" > /etc/apk/repositories; \
apk update; \
apk add --no-cache libevent libjpeg libwebp libpng freetype openssl; \
apk add --no-cache --virtual .build-deps \
libpng-dev libwebp-dev libevent-dev libxml2-dev freetype-dev openssl-dev libc-dev gcc make autoconf; \
docker-php-ext-install -j$(nproc) pdo pdo_mysql bcmath mysqli pcntl sockets zip opcache posix; \
wget https://pecl.php.net/get/event-2.3.0.tgz; \
tar -zxvf event-2.3.0.tgz; \
cd event-2.3.0; \
phpize; \
./configure --with-php-config=/usr/local/bin/php-config; \
make; \
make install; \
cd ..; \
rm event-2.3.0.tgz; \
rm -rf event-2.3.0; \
# 自动安装会导致错误,手动安装
# docker-php-ext-enable event; \
echo -e "extension=sockets.so\nextension=event.so\n" > /usr/local/etc/php/conf.d/docker-php-ext-sockets.ini; \
apk del .build-deps; \
docker-php-source extract; \
cp /usr/src/php/php.ini-development /usr/local/etc/php/php.ini; \
docker-php-source delete;
RUN set -xe \
&& 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 \
&& composer self-update \
&& composer config -g repo.packagist composer https://packagist.phpcomposer.com
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。