Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UID and GID #162

Open
Gyppie opened this issue Feb 22, 2021 · 3 comments
Open

UID and GID #162

Gyppie opened this issue Feb 22, 2021 · 3 comments

Comments

@Gyppie
Copy link

Gyppie commented Feb 22, 2021

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.

@joshhsoj1902
Copy link
Owner

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

@Gyppie
Copy link
Author

Gyppie commented Feb 26, 2021

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.

@joshhsoj1902
Copy link
Owner

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!

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

No branches or pull requests

2 participants