mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 13:51:32 +08:00
Docker entrypoint for running the application as non-root user
This commit is contained in:
13
extra/entrypoint.sh
Normal file
13
extra/entrypoint.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -e
|
||||
|
||||
files_ownership () {
|
||||
chown -hRc "${PUID=1000}":"${PGID=1000}" /app/data
|
||||
}
|
||||
|
||||
echo "==> Performing startup jobs and maintenance tasks"
|
||||
files_ownership
|
||||
|
||||
echo "==> Starting application with user ${PUID=1000} group ${PGID=1000}"
|
||||
exec setpriv --reuid "${PUID=1000}" --regid "${PGID=1000}" --clear-groups "$@"
|
Reference in New Issue
Block a user