Files
fm-orchestrator/openshift/frontend/run
Mike Bonnet 86c85825ee update container base images to Fedora 31
Also update the uid management in the frontend image to be more consistent with
best practices, as demonstrated by:

https://github.com/RHsyseng/container-rhel-examples/tree/master/starter-arbitrary-uid

This allows the dependency on nss_wrapper to be dropped.
2019-11-01 12:04:36 -07:00

15 lines
490 B
Bash
Executable File

#!/bin/sh
# OpenShift containers run as a user with a random uid. That uid does not appear
# in /etc/passwd, causing any attempts to look up the username associated with
# that uid to fail. This script appends an entry to /etc/passwd for the
# "default" user, using the current uid and gid.
if ! whoami &> /dev/null; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-default}:x:$(id -u):$(id -g):${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
fi
fi
exec "$@"