This commit is contained in:
2025-09-11 22:11:56 +08:00
parent 781190b8a6
commit 7fa935630d
2 changed files with 44 additions and 0 deletions

1
.ignore Normal file
View File

@ -0,0 +1 @@
.idea

43
Dockerfile Normal file
View 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