Files
monkey/.dockerfiles/entrypoint.sh
Chuck Smith 138df71cc8
Some checks failed
Publish Image / publish (push) Waiting to run
Test / build (push) Waiting to run
Build / build (push) Has been cancelled
build changes
2024-03-28 15:11:47 -04:00

17 lines
363 B
Bash

#!/bin/sh
set -e
if [ "$(id -u)" -eq 0 ]; then
[ -n "${PUID}" ] && usermod -u "${PUID}" monkey
[ -n "${PGID}" ] && groupmod -g "${PGID}" monkey
fi
printf "Configuring application...\n"
if [ "$(id -u)" -eq 0 ]; then
printf "Switching UID=%s and GID=%s\n" "$(id -u monkey)" "$(id -g monkey)"
exec su-exec monkey:monkey "$@"
else
exec "$@"
fi