From 15de67f8570e036351e8f44b8997faba09d73c9d Mon Sep 17 00:00:00 2001 From: Joshua Adkisson Date: Thu, 2 Apr 2026 10:47:02 -0500 Subject: [PATCH] Fix: use node user instead of openclaw --- Dockerfile | 13 ++++++------- entrypoint.sh | 7 ++----- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index c0a460a..7f996bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,17 +17,16 @@ RUN git clone --depth 1 https://github.com/openclaw/openclaw.git /opt/openclaw \ && pnpm install --frozen-lockfile \ && pnpm build -RUN useradd -m -u 1000 -s /bin/bash openclaw || true -RUN mkdir -p /home/openclaw/.claude \ - /home/openclaw/.openclaw \ - /home/openclaw/.openclaw/workspace \ - && chown -R 1000:1000 /home/openclaw +RUN mkdir -p /home/node/.claude \ + /home/node/.openclaw \ + /home/node/.openclaw/workspace \ + && chown -R node:node /home/node COPY entrypoint.sh /usr/local/bin/entrypoint.sh RUN chmod +x /usr/local/bin/entrypoint.sh -USER openclaw -WORKDIR /home/openclaw +USER node +WORKDIR /home/node EXPOSE 3456 18789 18790 diff --git a/entrypoint.sh b/entrypoint.sh index 93ba65e..4ca5862 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,8 +6,6 @@ MODE="${1:-run}" if [ "$MODE" = "auth" ]; then echo "=== Claude Code Authentication ===" echo "Run 'claude login' to authenticate with your Max subscription." - echo "Credentials are saved to the mounted volume at ~/.claude" - echo "" exec claude login fi @@ -18,20 +16,19 @@ fi echo "Checking Claude Code authentication..." if ! claude --version > /dev/null 2>&1; then echo "ERROR: Claude Code CLI not working." - echo "Run: docker compose run --rm openclaw auth" + echo "Run: docker exec -it openclaw /usr/local/bin/entrypoint.sh auth" exit 1 fi if [ ! -f "$HOME/.claude/.credentials.json" ] && [ -z "$ANTHROPIC_API_KEY" ]; then echo "ERROR: No Claude credentials found." - echo "Run: docker compose run --rm openclaw auth" + echo "Run: docker exec -it openclaw /usr/local/bin/entrypoint.sh auth" exit 1 fi echo "Claude Code CLI authenticated." echo "Starting claude-max-api-proxy on :3456..." node /opt/claude-max-api-proxy/dist/server/standalone.js & -PROXY_PID=$! for i in $(seq 1 30); do if curl -sf http://127.0.0.1:3456/health > /dev/null 2>&1; then