From 2eb98efe6189e2b2eb1d370cd500d08cc44eca99 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Thu, 25 Dec 2025 09:07:34 +0800 Subject: [PATCH] chore(docker): update docker/php/entrypoint.sh --- docker/php/entrypoint.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/docker/php/entrypoint.sh b/docker/php/entrypoint.sh index 1634d1cac..a892fde5a 100644 --- a/docker/php/entrypoint.sh +++ b/docker/php/entrypoint.sh @@ -3,15 +3,10 @@ set -e echo "=== ThinkPHP Docker权限初始化 ===" -# 定义应用根目录,支持参数传入 -APP_ROOT="${1:-/var/www/html}" +# 定义应用根目录,优先使用环境变量,否则使用默认值 +APP_ROOT="${PHP_APP_ROOT:-/var/www/html}" echo "使用应用根目录: $APP_ROOT" -if [ $# -eq 1 ]; then - echo "✅ 使用传入参数: $1" -else - echo "✅ 使用默认参数: /var/www/html" -fi # 获取正确的用户和组 if [ -n "$USER_ID" ] && [ -n "$GROUP_ID" ]; then