How to run all pods with specific user in Openshift Container Platform 3?
Issue
-
In OCP 3.3.0.32 environment run pods with different IDs. Example: Project A runs with
uid 100013000and Project B runs withuid 100014000. How to run pods with a specific user? -
I did the changes in the Dockerfile in order to put the user in the
/etc/passwd
RUN useradd -u 1001 -r -g 0 -d /var/lib/test -s /sbin/nologin -c "test example" example
- But we get a getpwuid error:
The message “KeyError: 'getpwuid(): uid not found: 1000340000'”
- How can I correctly write the Dockerfile in order to deploy successfully my pp in OpenShift with custom UID
Environment
- Red Hat Openshift Container Platform
- 3.2 and later
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.