dev:修改

This commit is contained in:
liubocheng 2025-03-27 14:33:55 +08:00
parent 7c483f860f
commit 14b4a7a088
1 changed files with 1 additions and 8 deletions

View File

@ -2,7 +2,7 @@ FROM php:7.3-fpm
# 替换为清华大学镜像源Debian 10 Buster # 替换为清华大学镜像源Debian 10 Buster
RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list \ RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list \
&& sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list && sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
# 安装系统依赖和扩展 # 安装系统依赖和扩展
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
@ -10,13 +10,6 @@ RUN apt-get update && apt-get install -y \
unzip \ unzip \
&& docker-php-ext-install pdo_mysql zip && docker-php-ext-install pdo_mysql zip
# 创建与宿主机匹配的用户和组(假设宿主机 deploy-user 的 UID=1003, GID=1003
RUN groupadd -g 1003 appuser \
&& useradd -u 1003 -g appuser -m -d /home/appuser -s /bin/bash appuser
# 切换用户
USER appuser
# 安装 Composer # 安装 Composer
RUN curl -sS https://getcomposer.org/installer | php -- \ RUN curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin \ --install-dir=/usr/local/bin \