mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Support running the container under OpenShift with alternate UIDs. Fixes #7257
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Fixup the passwd file, in case we're on OpenShift
|
||||
if ! whoami &> /dev/null; then
|
||||
if [ $(id -u) -ne 5050 ]; then
|
||||
if [ -w /etc/passwd ]; then
|
||||
echo "${USER_NAME:-pgadminr}:x:$(id -u):0:${USER_NAME:-pgadminr} user:${HOME}:/sbin/nologin" >> /etc/passwd
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Populate config_distro.py. This has some default config, as well as anything
|
||||
# provided by the user through the PGADMIN_CONFIG_* environment variables.
|
||||
# Only update the file on first launch. The empty file is created during the
|
||||
|
||||
Reference in New Issue
Block a user