mkuf / prind

print in docker - Deploy a containerized Klipper Stack for your 3D Printer
GNU General Public License v3.0
324 stars 82 forks source link

Allow modifiable UID and GID #85

Closed Nite16 closed 1 year ago

Nite16 commented 1 year ago

Requesting the ability to have the containers create and use a customizable UID and GID since my existing UID 1000 and GID 1000 is a user and group I don't want to have the level of access required to make the stack work.

mkuf commented 1 year ago

Hi, I've seen this feature in some existing containers where it is possible to do this via environment variables.
That said, this approach would add a lot of complexity to the images I'd like to avoid.
If this is requested by a significant amount of the userbase, I'd consider it for the next iterations.
So, if anyone else is reading this, please add to this conversation and state your usecase.

In the meantime, I suggest building your own images based on the upstream moonraker and klipper images and modify the uid/gid to your requirements. I added an example override file in https://github.com/mkuf/prind/commit/cc3564f1c811ca731c003f55bbbd051f91c42730, which accomplishes just that.

https://github.com/mkuf/prind/blob/cc3564f1c811ca731c003f55bbbd051f91c42730/custom/docker-compose.custom.unique-uid-gid.override.yaml#L1-L63

-Markus