github.com/argoproj/argo-cd@v1.8.7/uid_entrypoint.sh (about) 1 #!/bin/bash 2 3 # Make sure that if we are using an arbitrary UID that it appears in /etc/passwd, 4 # otherwise this will cause issues with things like cloning with git+ssh 5 # reference: https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html/creating_images/creating-images-guidelines#use-uid 6 if ! whoami &> /dev/null; then 7 if [ -w /etc/passwd ]; then 8 echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:/home/argocd:/sbin/nologin" >> /etc/passwd 9 fi 10 fi 11 12 # If we're started as PID 1, we should wrap command execution through tini to 13 # prevent leakage of orphaned processes ("zombies"). 14 if test "$$" = "1"; then 15 exec tini -- $@ 16 else 17 exec "$@" 18 fi