mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-11-09 20:57:26 +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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user