docs(docker): add docker.md (#227)

This commit is contained in:
Sarv
2025-08-28 01:53:59 +08:00
committed by GitHub
parent d7c730d426
commit 74e568085b
5 changed files with 547 additions and 38 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/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