Skip to content

Commit

Permalink
Added support for supplying supplementary groups of the X application.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlesage committed Jun 15, 2017
1 parent cc92744 commit d639f01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ to the `docker run` command.
- **GROUP_ID**
ID of the group the X application run as. Default is `1000`. See
[User/Group IDs](#usergroup-ids) to better understand when this should be set.
- **SUP_GROUP_IDS**
Comma-separated list of supplementary group IDs of the X application. By
default, this variable is not set.
- **APP_NICENESS**
Priority at which the X application should run. A niceness value of −20 is
the highest priority and 19 is the lowest priority. By default, niceness is
Expand Down
6 changes: 5 additions & 1 deletion rootfs/etc/services.d/guiapp/run
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ done

echo "[services.d] guiapp: starting "${APP_NAME:-X application}"..."
if [ -e /startapp.sh ]; then
exec 2>&1 $APP_NICE_CMD s6-setuidgid $USER_ID:$GROUP_ID /startapp.sh
if [ "${SUP_GROUP_IDS:-UNSET}" != "UNSET" ]; then
exec 2>&1 $APP_NICE_CMD s6-applyuidgid -u $USER_ID -g $GROUP_ID -G $SUP_GROUP_IDS /startapp.sh
else
exec 2>&1 $APP_NICE_CMD s6-setuidgid $USER_ID:$GROUP_ID /startapp.sh
fi
else
echo ""
echo "/!\\ No application to start: /startapp.sh is missing. /!\\"
Expand Down

0 comments on commit d639f01

Please sign in to comment.