feat: add dockerfile with the readme
This commit is contained in:
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM node:22-alpine
|
||||
|
||||
WORKDIR /app
|
||||
RUN npm install -g @anthropic-ai/claude-code
|
||||
|
||||
RUN apk add --no-cache bash
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV CLAUDE_CONFIG_DIR=/root/.claude
|
||||
|
||||
# Ensure config directory exists
|
||||
RUN mkdir -p $CLAUDE_CONFIG_DIR
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "-c", "claude; exec /bin/bash"]
|
||||
11
README.md
11
README.md
@@ -1,2 +1,13 @@
|
||||
# isolated-claude-code
|
||||
|
||||
1. Build the docker image. `docker build -t claude-code `
|
||||
2. Run the container `docker run --rm -it -v "$(git rev-parse --show-toplevel 2>/dev/null || pwd)":/app -v "$HOME/.claude":/root/.claude claude-code`
|
||||
|
||||
You can also add a shell alias:
|
||||
|
||||
```
|
||||
alias claude='docker run --rm -it \
|
||||
-v "$(git rev-parse --show-toplevel 2>/dev/null || pwd)":/app \
|
||||
-v "$HOME/.claude":/root/.claude \
|
||||
claude-code'
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user