Skip to content

Commit a773dc3

Browse files
fix: hardcode PATH in entrypoint since setpriv resets environment
The $PATH variable is empty after setpriv drops privileges because setpriv resets the environment. Now using explicit path values that match the Dockerfile's ENV PATH setting. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent efafb1d commit a773dc3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

deploy/scripts/entrypoint.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,10 @@ echo " Claude home: $CLAUDE_HOME ($(ls -ld "$CLAUDE_HOME"))"
185185
echo " Environment: CLAUDE_USER=$CLAUDE_USER, CLAUDE_GROUP=$CLAUDE_GROUP_NAME"
186186

187187
# Execute the main command with preserved environment
188-
# setpriv doesn't pass environment by default, so we use env to preserve PATH
188+
# setpriv resets environment, so we explicitly set required variables
189+
APP_PATH="/app/.venv/bin:/app/bun_global/bin:/usr/local/bin:/usr/bin:/bin"
189190
echo "Starting application: $*"
191+
echo " Using PATH: $APP_PATH"
190192
exec setpriv --reuid=claude --regid=claude --init-groups \
191-
env PATH="$PATH" HOME="$HOME" CLAUDE_USER="$CLAUDE_USER" CLAUDE_GROUP="$CLAUDE_GROUP" \
193+
env PATH="$APP_PATH" HOME="$HOME" CLAUDE_USER="$CLAUDE_USER" CLAUDE_GROUP="$CLAUDE_GROUP" \
192194
CLAUDE_WORKSPACE="$CLAUDE_WORKSPACE" "$@"

0 commit comments

Comments
 (0)