-
Notifications
You must be signed in to change notification settings - Fork 571
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
[NEXUS-14427] Usage of the UID via environment #80
base: main
Are you sure you want to change the base?
Conversation
o Introduced the usage of an environment variable for the user id to be used instead of hard coding it.
+1. I want to be able to run the nexus container with a different UID to prevent confusion on the host server (UID 200 is already taken by another user on our servers...). |
+1 |
Since we moved to the UBI doesn’t it run as a random uid?? |
Should this be a build arg instead? the user is created during image build cycle and if you use another id than 200 in docker run it should not work. |
@jonashartwig I'm against having this being a build arg, makes it impossible to just change it for different container-instances. |
Hi, it can be build arg and env. However, i fail to understand how this would work. |
Oh stupid me :) you are right @jonashartwig, no idea why this slipped my mind ... the user gets added at build-time. Maybe this should be changed too? Like "once per container"? The problem I see is this being hardcoded, so I would be forced to create my own Dockerfile to override this. Not sure which solution would be better: build-time or execution-time?! But whatever solution get's picked, it is better than current state where this is hard-coded. |
Openshift (Kubernetes like system) assigns a random UID / GID. The trick is to make a lot of world writable directories, and not assume you can get any homedirs or passwd entries that make sense. |
Actually it's not bid deal to update the Dockerfile with sed. But at least making uid/gid to be higher than 1000 (2000 for example) would make a life significantly easier. |
Introduced the usage of an environment variable
for the user id to be used instead of hard coding
it.
This pull request makes the following changes: