fix: Docker: Add

git safe.directory config for bind-mounted repos.Mark
 /app as safe directory to handle Git 2.35+ ownership
 checks in Docker containers.
This commit is contained in:
leon
2025-12-30 18:11:22 +08:00
parent 07ec880e33
commit 5c4fc3dc2c
2 changed files with 8 additions and 0 deletions

View File

@@ -1,5 +1,9 @@
#!/bin/bash
# Git 2.35+ may refuse to operate on bind-mounted repos with differing ownership ("dubious ownership").
# Mark /app as safe within the container.
git config --global --add safe.directory /app 2>/dev/null || true
set -e
env

View File

@@ -1,5 +1,9 @@
#!/bin/sh
# Git 2.35+ may refuse to operate on bind-mounted repos with differing ownership ("dubious ownership").
# Mark /app as safe within the container.
git config --global --add safe.directory /app 2>/dev/null || true
set -e
npm install