Support running as arbitrary user id on Openshift

Details

Type: New Feature

Status:Open

Priority: Medium

Resolution:
Unresolved

Affects versions:
None

Fix versions:
None

Labels:

None

Platform:

All

Sprint:

Edition:

Open Source

Description

Basically, Openshift provides a range of ids that can be used, the actual UID that is assigned is done during deployment time. Solution is to make root group the owner of relevant files and to give those files rw access for the group. Then add the user dynamically to /etc/passwd.

This suggestion is relevant to our case because solr also uses alpine. Our docker image is based on alpine. Some other solutions suggested on the internet may not be relevant, for example using nss_wrapper because this package is not available on alpine.

Note: Another workaround is to give permissions to run image as root. However, Openshift admins may not allow this at some customer sites. For example,
oadm policy add-scc-to-user anyuid -z default