argo-cd/test/container/uid_entrypoint.sh
jannfis e5d9c39308
chore: Fix some annoyances when running locally (#6576)
Signed-off-by: jannfis <jann@mistrust.net>
2021-06-28 20:54:26 +02:00

16 lines
347 B
Bash
Executable file

#!/bin/bash
set -e
if test "$(id -u)" == "0" -a "${USER_ID}" != ""; then
useradd -u ${USER_ID} -d /home/user -s /bin/bash ${USER_NAME:-default}
chown -R "${USER_NAME:-default}" ${GOCACHE}
fi
export PATH=$PATH:/usr/local/go/bin:/go/bin
export GOROOT=/usr/local/go
if test "$$" = "1"; then
exec tini -- "$@"
else
exec "$@"
fi