Files
SnapOtter/docker/entrypoint.sh
T
Siddharth Kumar Sah 3642b7d3b2 fix: log volume permission errors instead of swallowing them
Previously chown errors were silently discarded. Now logs a warning so
users can diagnose permission issues with Docker volume mounts.
2026-04-04 14:06:48 +08:00

14 lines
471 B
Bash
Executable File

#!/bin/sh
set -e
# Fix ownership of mounted volumes so the non-root stirling user can write.
# This runs as root, fixes permissions, then drops to stirling via gosu.
if [ "$(id -u)" = "0" ]; then
chown -R stirling:stirling /data /tmp/workspace 2>&1 || \
echo "WARNING: Could not fix volume permissions. If processing fails, check your volume mount permissions." >&2
exec gosu stirling "$@"
fi
# Already running as stirling (e.g. Kubernetes runAsUser)
exec "$@"