python alpine base image for image creation

This commit is contained in:
Andre Beging
2025-10-09 11:16:32 +02:00
parent a29ce99420
commit 5c22415ab4
2 changed files with 9 additions and 10 deletions

View File

@@ -4,13 +4,13 @@ set -e
# If running as root, fix ownership of /data, then drop privileges
if [ "$(id -u)" = "0" ]; then
mkdir -p /data
chown -R appuser:appuser /data || echo "Warn: could not chown /data"
chown -R appuser:appgroup /data || echo "Warn: could not chown /data"
# Copy example config only if missing target
if [ ! -f /app/config.yaml ] && [ -f /app/config.example.yaml ]; then
cp /app/config.example.yaml /app/config.yaml
chown appuser:appuser /app/config.yaml || true
chown appuser:appgroup /app/config.yaml || true
fi
exec su -s /bin/sh appuser -c "$*"
exec su-exec appuser "$@"
else
exec "$@"
fi