Compare commits
3 changed files with 0 additions and 56 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,6 +1,5 @@
|
||||||
sanic
|
sanic
|
||||||
result
|
result
|
||||||
.claude-env
|
|
||||||
# self-signed certs for testing
|
# self-signed certs for testing
|
||||||
*.pem
|
*.pem
|
||||||
# test files
|
# test files
|
||||||
|
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
# Claude Code with pro subscription (Long-lived OAuth token) in a container
|
|
||||||
# Use docker-compose-claude.yml to run
|
|
||||||
|
|
||||||
FROM debian:bookworm-slim
|
|
||||||
|
|
||||||
# Basic tooling Claude Code relies on (git for repo work, ripgrep for fast
|
|
||||||
# search, plus curl/ca-certificates for the installer and API traffic)
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
||||||
ca-certificates \
|
|
||||||
curl \
|
|
||||||
git \
|
|
||||||
ripgrep \
|
|
||||||
jq \
|
|
||||||
procps \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Run as a non-root user (recommended; Claude Code warns when run as root)
|
|
||||||
RUN useradd -m -s /bin/bash claude
|
|
||||||
USER claude
|
|
||||||
WORKDIR /home/claude
|
|
||||||
|
|
||||||
# Skip the first-run onboarding wizard, as it ignores CLAUDE_CODE_OAUTH_TOKEN
|
|
||||||
# and forces a browser login (known bug).
|
|
||||||
RUN echo '{"hasCompletedOnboarding": true, "theme": "dark"}' > /home/claude/.claude.json
|
|
||||||
|
|
||||||
# Install Claude Code via the native installer (no Node.js needed)
|
|
||||||
RUN curl -fsSL https://claude.ai/install.sh | bash
|
|
||||||
|
|
||||||
# The installer puts the binary in ~/.local/bin
|
|
||||||
ENV PATH="/home/claude/.local/bin:${PATH}"
|
|
||||||
|
|
||||||
# Your project gets mounted here
|
|
||||||
WORKDIR /workspace
|
|
||||||
|
|
||||||
ENTRYPOINT ["claude"]
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
# There must be a .claude-env file, where claude oauth token is present: CLAUDE_CODE_OAUTH_TOKEN=sk-ant-oat01-...
|
|
||||||
# Run compose like this: docker compose -f docker-compose-claude.yml run --rm claude-code
|
|
||||||
# Do NOT use docker compose up instead of run, or your console output will be glitched.
|
|
||||||
|
|
||||||
services:
|
|
||||||
claude-code:
|
|
||||||
build: Dockerfile-claude
|
|
||||||
image: claude-code
|
|
||||||
env_file:
|
|
||||||
- .claude-env # contains: CLAUDE_CODE_OAUTH_TOKEN=sk-ant-oat01-...
|
|
||||||
volumes:
|
|
||||||
- ./:/workspace # your project (compose file's directory)
|
|
||||||
- ./claude-config:/home/claude/.claude # persists settings/history
|
|
||||||
tmpfs:
|
|
||||||
- /workspace/.git:ro # Shadow .git dir, to hide it from claude
|
|
||||||
working_dir: /workspace
|
|
||||||
|
|
||||||
stdin_open: true # keep STDIN open (-i)
|
|
||||||
tty: true # allocate a TTY (-t) — Claude Code is interactive
|
|
||||||
|
|
||||||
Loading…
Reference in a new issue