Files
intelligence-terminal/docker-entrypoint.sh
MrSphay c2d572e6f5
All checks were successful
Release Dry Run / release-dry-run (push) Successful in 9s
Codex Template Compliance / template-compliance (push) Successful in 5s
Build / test-and-image (push) Successful in 1m6s
fix: prepare runs volume before dropping privileges
2026-05-17 05:11:20 +02:00

16 lines
356 B
Bash

#!/bin/sh
set -eu
mkdir -p /app/runs/memory/cold
if chown -R node:node /app/runs 2>/dev/null; then
exec su-exec node "$@"
fi
if su-exec node sh -c 'test -w /app/runs && test -w /app/runs/memory'; then
exec su-exec node "$@"
fi
echo "[entrypoint] WARNING: /app/runs is not writable by user node; starting as root for this bind mount." >&2
exec "$@"