Files
chatlog_alpha/script/docker-entrypoint.sh
lx1056758714-glitch 3d04a7f3eb 同步本地代码
2025-12-13 17:30:38 +08:00

21 lines
340 B
Bash

#!/bin/sh
set -eu
[ -n "${UMASK:-}" ] && umask "$UMASK"
if [ "$(id -u)" = '0' ]; then
PUID=${PUID:-1000}
PGID=${PGID:-1000}
DATA_DIRS="/app /usr/local/bin"
for DIR in ${DATA_DIRS}; do
if [ -d "$DIR" ]; then
chown -R "${PUID}:${PGID}" "$DIR" || true
fi
done
exec gosu "${PUID}:${PGID}" "$@"
else
exec "$@"
fi