diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 6c97dea5..a00bd823 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -14,8 +14,12 @@ if [ -z "$GIT_USER_EMAIL" ]; then exit 1 fi -# Use GIT_AUTHOR/COMMITTER env vars instead of git config --global, -# so the root filesystem can stay read-only (no ~/.gitconfig write). +# Set git identity globally so it persists for all shells (docker exec, etc.), +# not just the entrypoint process tree. +git config --global user.name "$GIT_USER_NAME" +git config --global user.email "$GIT_USER_EMAIL" + +# Also set env vars for backwards compatibility. export GIT_AUTHOR_NAME="$GIT_USER_NAME" export GIT_COMMITTER_NAME="$GIT_USER_NAME" export GIT_AUTHOR_EMAIL="$GIT_USER_EMAIL" @@ -27,7 +31,7 @@ export GIT_COMMITTER_EMAIL="$GIT_USER_EMAIL" # binaries on a Linux container). Reinstall to get the right ones. if [ -d /workspace/frontend ] && [ -f /workspace/frontend/package.json ]; then echo "Installing frontend dependencies for container platform..." - cd /workspace/frontend && npm install --prefer-offline 2>/dev/null || true + cd /workspace/frontend && npm ci --prefer-offline 2>/dev/null || true cd /workspace fi