dev:修改dockerfile

This commit is contained in:
liubocheng 2025-03-27 13:52:17 +08:00
parent 5938b44e28
commit 7c483f860f
1 changed files with 7 additions and 0 deletions

View File

@ -10,6 +10,13 @@ RUN apt-get update && apt-get install -y \
unzip \
&& 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
RUN curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin \