feat: native support for rootless container execution

This commit is contained in:
Jonathan Gilbert
2026-05-02 09:14:18 +10:00
parent ba4a6a53d7
commit 4359aca5bf
8 changed files with 34 additions and 5 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/command/with-contenv bash
# shellcheck shell=bash
LOG_DIR=$1
if [ -z "$LOG_DIR" ]; then
echo "Usage: $0 <log-dir>"
exit 1
fi
CMD=(s6-log -b -- ${S6_LOGGING_SCRIPT:-n20 s1000000 T} "$LOG_DIR")
if [ "$(id -u)" = "0" ]; then
exec /command/s6-envuidgid nobody /command/s6-applyuidgid -U -- "${CMD[@]}"
else
exec "${CMD[@]}"
fi