mirror of
https://github.com/games-on-whales/gow.git
synced 2026-10-16 05:12:00 +00:00
[PR #97] [MERGED] Configure retro user UID and GID on container startups #151
Labels
No labels
bug
enhancement
enhancement
github_actions
good first issue
help wanted
help wanted
invalid
needs testers
pull-request
question
x11-images
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/gow#151
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/gow/pull/97
Author: @Josh5
Created: 10/15/2022
Status: ✅ Merged
Merged: 2/6/2023
Merged by: @ABeltramo
Base:
master← Head:dev-retro-user📝 Commits (10+)
0a13e51Update base image to allow UID and GID to be set on container startupca916faAllow use ofdocker-composecommand0579812Uns POSIX compliant function syntaxd017e20Remove 'USER_PASSWORD' from base image1992c74Add PUID and PGID env variables to common.env and user.env filesb3ef0a3Remove 'sudo' from project4b9cf36Fix services that should run as user to run such using gosu16e9252Wrap bash vars in "8cef2b7Configure default user for services that will run as rootef20d36Ensure the home directory is owned by PUID:PGID on startup📊 Changes
25 files changed (+192 additions, -123 deletions)
View changed files
📝
compose/apps/steam.yml(+0 -1)📝
config/common.env(+3 -0)📝
images/base-app/Dockerfile(+2 -0)📝
images/base/Dockerfile(+50 -30)➖
images/base/build/setup-retro-user(+0 -29)➕
images/base/overlay/entrypoint.sh(+28 -0)➕
images/base/overlay/etc/cont-init.d/10-setup_user.sh(+25 -0)➕
images/base/overlay/etc/cont-init.d/15-setup_devices.sh(+14 -0)➕
images/base/overlay/opt/gow/bash-lib/utils.sh(+7 -0)📝
images/base/overlay/opt/gow/ensure-groups(+4 -4)➕
images/base/overlay/opt/gow/startup.sh(+6 -0)➖
images/base/scripts/bootstrap.sh(+0 -18)➖
images/base/scripts/lib/utils.sh(+0 -7)📝
images/pulseaudio/Dockerfile(+11 -7)📝
images/retroarch/Dockerfile(+0 -3)📝
images/steam/Dockerfile(+0 -2)📝
images/steam/scripts/startup.sh(+1 -1)📝
images/sunshine/Dockerfile(+0 -2)📝
images/sunshine/scripts/startup.sh(+1 -1)📝
images/udevd/Dockerfile(+5 -0)...and 5 more files
📄 Description
To achieve this, I have switched out our init to always run as root for all containers. This will carry out any root user config and then, if the container should exec the process as an unprivileged user, this init will use
gosuto drop down to that user.This work removes all requirement for
sudoinside the container.This has the benefit of PID 1 always being the service that is running rather than
sudo exec <command>. PID 1 will always receive all SIG calls from Docker and therefore, when we terminate the container we will be making that CLI directly to the service running inside - EG. sunshine, steam, etc.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.