From 501411e2935bb02f564b96c3ff672b3a5180326d Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 16 Nov 2021 17:17:08 +0100 Subject: [PATCH] (bug) unable to run the setup/upgrade scripts as root yq has updated its docker image to prevent running as root so we need to provide the current user id when running the image More info: https://github.com/mikefarah/yq/issues/890 --- CHANGELOG.md | 2 ++ setup/setup.sh | 2 +- setup/upgrade.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9a464ef1..4004b6b2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog Fab-manager +- Fix a bug: unable to run the setup/upgrade scripts as root + ## v5.1.12 2021 November 10 - Added an automated test on the plan creation endpoint diff --git a/setup/setup.sh b/setup/setup.sh index 6c757f500..e137752a9 100755 --- a/setup/setup.sh +++ b/setup/setup.sh @@ -194,7 +194,7 @@ prepare_files() } yq() { - docker run --rm -i -v "${FABMANAGER_PATH}:/workdir" mikefarah/yq:4 "$@" + docker run --rm -i -v "${FABMANAGER_PATH}:/workdir" --user "$UID" mikefarah/yq:4 "$@" } prepare_nginx() diff --git a/setup/upgrade.sh b/setup/upgrade.sh index ab0f9c48f..a0634286d 100644 --- a/setup/upgrade.sh +++ b/setup/upgrade.sh @@ -36,7 +36,7 @@ parseparams() } yq() { - docker run --rm -i -v "${PWD}:/workdir" mikefarah/yq:4 "$@" + docker run --rm -i -v "${PWD}:/workdir" --user "$UID" mikefarah/yq:4 "$@" } jq() {