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

fix: running the container with PUID=0 and PGID=0 #3030

Merged
merged 2 commits into from
Jan 27, 2024

Conversation

xThaid
Copy link
Contributor

@xThaid xThaid commented Jan 22, 2024

What type of PR is this?

(REQUIRED)

  • bug

What this PR does / why we need it:

(REQUIRED)

I run the container with PUID=0 and PGID=0 and when updated to the recent release (V1.0.0), it couldn't start. I was getting a stream of logs like:

Switching to dedicated user
usermod: no changes
Switching to dedicated user
usermod: no changes
Switching to dedicated user
usermod: no changes
Switching to dedicated user
usermod: no changes
Switching to dedicated user
...

It is because the entrypoint script (running with id=0) tries to create a new user (with id=0) and then executes itself again as that user. Hence the infinite loop.

Which issue(s) this PR fixes:

Regression caused by #2882

(REQUIRED)

Testing

Build the container and run it with PUID=0 and PGID=0

@hay-kot
Copy link
Collaborator

hay-kot commented Jan 22, 2024

Thanks for the PR! Why do you want to run as 0?

@xThaid
Copy link
Contributor Author

xThaid commented Jan 22, 2024

I use rootless Podman to run containers, so there's no need to change the user ID further.

@renhardy
Copy link

My setup also requires having PUID=0 and PGID=0. This change would be appreciated.

Copy link
Collaborator

@hay-kot hay-kot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, LGTM

@hay-kot hay-kot enabled auto-merge (squash) January 27, 2024 17:43
@hay-kot hay-kot merged commit 4d49e30 into mealie-recipes:mealie-next Jan 27, 2024
9 checks passed
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.

3 participants