Support running as arbitrary user id on Openshift

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.

See comment on this issue documented in Solr Github.

https://github.com/docker-solr/docker-solr/issues/126

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

Also see:

https://docs.openshift.com/enterprise/3.2/creating_images/guidelines.html "Support Arbitrary User IDs".

Workaround

None

Acceptance Test

None

Status

Assignee

Unassigned

Reporter

Dixson Huie

Labels

None

Priority

Medium

SalesForce Case ID

None

Fix versions

None

Commitment Version/s

None

Due date

None

Product

None

Edition

Open Source

Platform

All