feat: user node user for all the operations instead of root

This commit is contained in:
2025-10-23 17:35:29 +05:30
parent e7c48d53c6
commit 76e753b0bb
2 changed files with 21 additions and 16 deletions

View File

@@ -1,13 +1,14 @@
# 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:
1. Build the docker image. `docker build -t claude-code .`
2. Run the container:
```
alias claude='docker run --rm -it \
-v "$(git rev-parse --show-toplevel 2>/dev/null || pwd)":/app \
-v "$HOME/.claude":/root/.claude \
claude-code'
docker run --rm -it \
--user "$(id -u):$(id -g)" \
-v "$(pwd)":/home/node/app \
-v "$HOME/.claude":/home/node/.claude \
claude-code
```
You can add a shell alias to faster access.