mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-11-13 22:51:31 +01:00
allow .dockcross to use sudo
so set-up sudo before .dockcross executes!
This commit is contained in:
parent
ba6b0624f8
commit
b3e72f7bf4
@ -36,15 +36,15 @@ if [[ -n $BUILDER_UID ]] && [[ -n $BUILDER_GID ]]; then
|
|||||||
/dockcross/pre_exec.sh
|
/dockcross/pre_exec.sh
|
||||||
fi
|
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
|
# Execute project specific pre execution hook
|
||||||
if [[ -e /work/.dockcross ]]; then
|
if [[ -e /work/.dockcross ]]; then
|
||||||
gosu $BUILDER_UID:$BUILDER_GID /work/.dockcross
|
gosu $BUILDER_UID:$BUILDER_GID /work/.dockcross
|
||||||
fi
|
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.
|
# Run the command as the specified user/group.
|
||||||
exec gosu $BUILDER_UID:$BUILDER_GID "$@"
|
exec gosu $BUILDER_UID:$BUILDER_GID "$@"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user