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

run on openshift 3.6, user does not exist #359

Closed
walnut-tom opened this issue Oct 18, 2017 · 6 comments · Fixed by #448
Closed

run on openshift 3.6, user does not exist #359

walnut-tom opened this issue Oct 18, 2017 · 6 comments · Fixed by #448

Comments

@walnut-tom
Copy link

initdb: could not look up effective user ID 1000360000: user does not exist

@yosifkit
Copy link
Member

Yes, this is noted in the documentation.

As of #253, this image supports running as a (mostly) arbitrary user via --user on docker run.

The main caveat to note is that postgres doesn't care what UID it runs as (as long as the owner of /var/lib/postgresql/data matches), but initdb does care (and needs the user to exist in /etc/passwd)

- https://github.com/docker-library/docs/tree/2c7f3a40774774389a4a372ef21ccd34ea53d551/postgres#arbitrary---user-notes

@mkjpryor-stfc
Copy link

@yosifkit: Just because it is noted in the documentation doesn't mean that it is OK.

This is a major pain when running on OpenShift, and could be fixed by a simple use of nss_wrapper.

@tianon
Copy link
Member

tianon commented May 24, 2018

Not sure how I missed this before, but https://cwrap.org/nss_wrapper.html is the first sane solution I've seen proposed to this OpenShift-specific problem -- essentially faking software that cares to think the user we're running as exists in /etc/passwd is pretty smart IMO.

I'm reopening so we can explore this solution more.

@tianon tianon reopened this May 24, 2018
@tianon
Copy link
Member

tianon commented May 24, 2018

https://bugs.alpinelinux.org/issues/6710 makes me sad, but https://packages.debian.org/source/stretch/nss-wrapper is a good sign! (so at least Debian-based images using this would be pretty trivial)

@tianon
Copy link
Member

tianon commented May 24, 2018

Success! #448

@rgov
Copy link

rgov commented Jun 1, 2019

If, like me, you wound up here because your Postgres container would not run on OpenShift: don't use the -alpine variant, as it still does not contain the nss-wrapper tool that is needed.

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 a pull request may close this issue.

5 participants