This commit is contained in:
2025-09-11 23:12:47 +08:00
parent 7fa935630d
commit a828f96025

View File

@ -1,24 +1,30 @@
FROM php:7.2.34-fpm-alpine3.12
# 环境变量
ENV COMPOSER_ALLOW_SUPERUSER=1 \
COMPOSER_HOME=/composer
COMPOSER_HOME=/composer \
COMPOSER_MEMORY_LIMIT=-1
# 使用阿里云 Alpine 3.12 存档源
RUN echo "https://mirrors.aliyun.com/alpine/v3.12/main" > /etc/apk/repositories \
&& echo "https://mirrors.aliyun.com/alpine/v3.12/community" >> /etc/apk/repositories
# 安装依赖 + 常用扩展
RUN apk add --no-cache \
bash \
git \
curl \
wget \
unzip \
libzip-dev \
mariadb-connector-c-dev \
openssl \
openssl-dev \
pcre \
pcre-dev \
zlib \
zlib-dev \
icu-dev \
oniguruma-dev \
autoconf \
linux-headers \
build-base \
&& docker-php-ext-install \
pdo_mysql \
@ -36,8 +42,7 @@ RUN apk add --no-cache \
&& curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin --filename=composer \
# 清理
&& apk del build-base \
&& apk del build-base autoconf linux-headers \
&& rm -rf /tmp/pear ~/.pearrc /var/cache/apk/*
# 工作目录
WORKDIR /www/wwwroot/admin
WORKDIR /var/www/html