From b3e72f7bf4be5b64d55d391c02992f24a2fe8534 Mon Sep 17 00:00:00 2001 From: Daniel Hwang Date: Mon, 25 May 2020 20:55:47 -0700 Subject: [PATCH] allow .dockcross to use sudo so set-up sudo before .dockcross executes! --- imagefiles/entrypoint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/imagefiles/entrypoint.sh b/imagefiles/entrypoint.sh index 226e3dd..103ab14 100755 --- a/imagefiles/entrypoint.sh +++ b/imagefiles/entrypoint.sh @@ -36,15 +36,15 @@ if [[ -n $BUILDER_UID ]] && [[ -n $BUILDER_GID ]]; then /dockcross/pre_exec.sh fi + # Enable passwordless sudo capabilities for the user + chown root:$BUILDER_GID $(which gosu) + chmod +s $(which gosu); sync + # Execute project specific pre execution hook if [[ -e /work/.dockcross ]]; then gosu $BUILDER_UID:$BUILDER_GID /work/.dockcross fi - # Enable passwordless sudo capabilities for the user - chown root:$BUILDER_GID $(which gosu) - chmod +s $(which gosu); sync - # Run the command as the specified user/group. exec gosu $BUILDER_UID:$BUILDER_GID "$@" else