Fix: sudo docker build context + bootstrap reexec sudo

This commit is contained in:
dev
2026-08-22 15:28:06 +02:00
parent 140ae38877
commit e685a5db8b
2 changed files with 69 additions and 14 deletions
+3 -6
View File
@@ -3,11 +3,8 @@
#
# Skapar INTE ny Node-RED-container. Patchar /home/ncdeploy/nextcloud-node-red och bygger om.
#
# One-liner:
# curl -fsSL https://git.domain.name/your-user/nextcloud-collabora-nodered/raw/branch/main/bootstrap-install.sh | bash
#
# Som ncdeploy (rekommenderat):
# curl -fsSL ... | sudo -u ncdeploy bash
# One-liner (kör som ncdeploy, INTE root):
# curl -fsSL https://git.domain.name/your-user/nextcloud-collabora-nodered/raw/branch/main/bootstrap-install.sh | sudo -u ncdeploy bash
#
# Om git "dubious ownership" (root ägde repot):
# sudo bash scripts/fix-repo-ownership.sh
@@ -64,7 +61,7 @@ reexec_as_install_user() {
log "Kör om som ${user} (inte root)..."
export BOOTSTRAP_REEXEC=1
export INSTALL_DIR NODERED_DIR INSTALL_MODE GIT_REPO_URL GIT_BRANCH
exec run_as_root sudo -u "${user}" -H env \
exec sudo -u "${user}" -H env \
BOOTSTRAP_REEXEC=1 \
INSTALL_DIR="${INSTALL_DIR}" \
NODERED_DIR="${NODERED_DIR}" \