Running Proxy with host UID and GUID

Fixes #2
This commit is contained in:
Stefan Allius
2023-09-28 21:46:02 +02:00
parent 125f681bec
commit c0a2a705ec
3 changed files with 59 additions and 21 deletions

15
app/entrypoint.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
set -e
user="$(id -u)"
echo "#############################################"
echo "# start: '$SERVICE_NAME'"
echo "# with UserID:$UID, GroupID:$GID"
echo "#############################################"
if [ "$user" = '0' ]; then
[ -d "/home/$SERVICE_NAME" ] && chown -R $SERVICE_NAME:$SERVICE_NAME /home/$SERVICE_NAME || true
exec gosu $SERVICE_NAME "$@"
else
exec "$@"
fi