Skip to content

Conversation

@kevinf100
Copy link

As discussed in #94
Playit will now run without root and has it USER set to non-root.
The following in the Dockerfile allows users to change the ID.
ARG PLAYIT_GUID=2000
ARG PLAYIT_UUID=2000
https://docs.docker.com/build/guide/build-args/
https://docs.docker.com/reference/compose-file/build/#args
Ignore #95 , I didn't mess up at all and didn't copy the whole Dockerfile.

This will create a home in /home, but setting the home makes Linux change /playit owner to be playit. We want it to stay as root as you can freely mess with files in a folder you own, regardless of the permission of that file.
@kevinf100
Copy link
Author

kevinf100 commented Aug 27, 2024

Notice after that setting the user home changes that folder permission. Also adduser seemed to ignore that -M flag. Not sure whats up with that. This now has an empty folder in /home. Maybe sometime later, /home/playit can be used or -M will work.

@kevinf100
Copy link
Author

kevinf100 commented Sep 13, 2024

Added SIGTERM handler so the container stops sooner and so Playit can handle SIGTERM to exit gracefully (Assuming it can handle it already). Example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant