Openshift supports running pods using arbitrary UIDs (https://docs.openshift.com/container-platform/3.7/creating_images/guidelines.html#openshift-specific-guidelines) to improve security. Although entrypoint.sh was developed to cover this feature, the script is returning an error.
The issue is that the script uses getent to find the passwd entry of the current UID, and if the entry is not found it creates an entry in /etc/passwd. According to the getent man page:
And since the script begin with a "set
ex" command, which means it turns on debug and breaks the script if the command pipelines returns an exit code other than 0.-
Having that said, this line below must be changed to remove the "-e" flag from set command: