mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-12-22 16:24:27 +01:00
Merge pull request #416 from gnawhleinad/allow-sudo
allow .dockcross to use sudo
This commit is contained in:
commit
99cf8c38f4
@ -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