Fix: sudo docker build context + bootstrap reexec sudo

This commit is contained in:
Hannes Ahlin
2026-08-22 15:28:06 +02:00
parent bd96628807
commit f2fa7ffecf
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/ncadmin/nextcloud-node-red och bygger om.
#
# One-liner:
# curl -fsSL https://kode.hannesahlin.se/n3wk/nextcloud-collabora-nodered/raw/branch/main/bootstrap-install.sh | bash
#
# Som ncadmin (rekommenderat):
# curl -fsSL ... | sudo -u ncadmin bash
# One-liner (kör som ncadmin, INTE root):
# curl -fsSL https://kode.hannesahlin.se/n3wk/nextcloud-collabora-nodered/raw/branch/main/bootstrap-install.sh | sudo -u ncadmin 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}" \