aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/microservices/collectd-operator/build/bin/entrypoint
diff options
context:
space:
mode:
Diffstat (limited to 'vnfs/DAaaS/microservices/collectd-operator/build/bin/entrypoint')
-rwxr-xr-xvnfs/DAaaS/microservices/collectd-operator/build/bin/entrypoint12
1 files changed, 12 insertions, 0 deletions
diff --git a/vnfs/DAaaS/microservices/collectd-operator/build/bin/entrypoint b/vnfs/DAaaS/microservices/collectd-operator/build/bin/entrypoint
new file mode 100755
index 00000000..3c0546c5
--- /dev/null
+++ b/vnfs/DAaaS/microservices/collectd-operator/build/bin/entrypoint
@@ -0,0 +1,12 @@
+#!/bin/sh -e
+
+# This is documented here:
+# https://docs.openshift.com/container-platform/3.11/creating_images/guidelines.html#openshift-specific-guidelines
+
+if ! whoami &>/dev/null; then
+ if [ -w /etc/passwd ]; then
+ echo "${USER_NAME:-collectd-operator}:x:$(id -u):$(id -g):${USER_NAME:-collectd-operator} user:${HOME}:/sbin/nologin" >> /etc/passwd
+ fi
+fi
+
+exec ${OPERATOR} $@