Skip to content

Commit be88c89

Browse files
committed
fix: add non-root user to claude-runner container
Claude Code CLI refuses --dangerously-skip-permissions when running as root. Add a 'runner' user for headless container execution.
1 parent 72518cc commit be88c89

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

infra/docker/claude-runner/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1313
npm install -g @anthropic-ai/claude-code && \
1414
apt-get clean && rm -rf /var/lib/apt/lists/*
1515

16+
RUN useradd -m -s /bin/bash runner
17+
1618
WORKDIR /workspace
1719

1820
COPY entrypoint.sh /entrypoint.sh
19-
RUN chmod +x /entrypoint.sh
21+
RUN chmod +x /entrypoint.sh && chown runner:runner /workspace
2022

23+
USER runner
2124
ENTRYPOINT ["/entrypoint.sh"]

0 commit comments

Comments
 (0)