linuxgsm-docker
linuxgsm-docker copied to clipboard
UID and GID
I use openmediavault. Is it possible to run linuxgsm-docker with the same UID and GID as my local user on my server? I run into filepermission issues. And I want read/write options to the volume folder outside the docker image. My local UID=1001 and GID=100. Linuxgsm user has UID=1000 and GID=1000.
There isn't a way to do that "out of the box". I might need to poke around and see how other docker containers allow the UID and GID to be set.
for reference this is where we user is added as part of the docker build:
https://github.com/joshhsoj1902/linuxgsm-docker/blob/master/Dockerfile#L106
By building the gameserver from Dockerfile I managed to set the UID and GID to my user. I just simply edited a little where the user is added.
RUN addgroup --ingroup 100 linuxgsm \
&& adduser \
--disabled-login \
--disabled-password \
--shell /bin/bash \
--gecos "" \
--gid 100 \
--uid 1001 \
linuxgsm \
&& usermod -G tty linuxgsm \
&& chown -R linuxgsm:linuxgsm /home/linuxgsm
I am really having a blast learning. I'm not a linux guru, but I'm getting there step by step. And messing around with docker is fun.
I hoped something like that would work for you. It's less convenient then if the image supported that out of the box, but that's a task for another day :D
Thankfully this base image doesn't change too much, typically only when I add support for another game.
I'm glad you're enjoying docker and getting the hang of linux :). They are fantastic skills to have!