update
This commit is contained in:
43
Dockerfile
Normal file
43
Dockerfile
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
FROM php:7.2.34-fpm-alpine3.12
|
||||||
|
|
||||||
|
# 环境变量
|
||||||
|
ENV COMPOSER_ALLOW_SUPERUSER=1 \
|
||||||
|
COMPOSER_HOME=/composer
|
||||||
|
|
||||||
|
# 安装依赖 + 常用扩展
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
bash \
|
||||||
|
git \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
unzip \
|
||||||
|
libzip-dev \
|
||||||
|
openssl \
|
||||||
|
openssl-dev \
|
||||||
|
pcre \
|
||||||
|
pcre-dev \
|
||||||
|
zlib \
|
||||||
|
zlib-dev \
|
||||||
|
icu-dev \
|
||||||
|
build-base \
|
||||||
|
&& docker-php-ext-install \
|
||||||
|
pdo_mysql \
|
||||||
|
mysqli \
|
||||||
|
mbstring \
|
||||||
|
opcache \
|
||||||
|
zip \
|
||||||
|
# 安装 swoole(固定版本,兼容 php7.2)
|
||||||
|
&& pecl install swoole-4.8.12 \
|
||||||
|
&& docker-php-ext-enable swoole \
|
||||||
|
# 安装 redis 扩展(最后一个支持 php7.2 的版本)
|
||||||
|
&& pecl install redis-5.3.7 \
|
||||||
|
&& docker-php-ext-enable redis \
|
||||||
|
# 安装 composer
|
||||||
|
&& curl -sS https://getcomposer.org/installer | php -- \
|
||||||
|
--install-dir=/usr/local/bin --filename=composer \
|
||||||
|
# 清理
|
||||||
|
&& apk del build-base \
|
||||||
|
&& rm -rf /tmp/pear ~/.pearrc /var/cache/apk/*
|
||||||
|
|
||||||
|
# 工作目录
|
||||||
|
WORKDIR /www/wwwroot/admin
|
Reference in New Issue
Block a user