Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,26 @@ chmod +x install.sh
./install.sh
```

### Stop and resume

Stop the sandbox when you are done:

```bash
container stop coderunner
```

Resume the same sandbox later, preserving uploads, kernels, and installed packages:

```bash
container start coderunner
```

To start over with a clean sandbox, delete the container and run the installer again:

```bash
container delete coderunner && ./install.sh
```


## Run Claude Code inside a Sandbox

Expand Down
23 changes: 14 additions & 9 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,6 @@ echo "Running: container system property set dns.domain local"
container system property set dns.domain local


echo "Pulling the latest image: instavm/coderunner"
if ! container image pull instavm/coderunner; then
echo "❌ Failed to pull image. Please check your internet connection and try again."
exit 1
fi

echo "→ Ensuring coderunner assets directories…"
ASSETS_SRC="$HOME/.coderunner/assets"
mkdir -p "$ASSETS_SRC/skills/user"
Expand All @@ -98,19 +92,30 @@ echo "Stopping any existing coderunner container..."
container stop coderunner 2>/dev/null || true
sleep 2

echo "Trying to resume any existing coderunner container..."
if container start coderunner 2>/dev/null; then
echo "✅ Setup complete. MCP server is available at http://coderunner.local:8222/mcp"
exit 0
fi

echo "Pulling the latest image: instavm/coderunner"
if ! container image pull instavm/coderunner; then
echo "❌ Failed to pull image. Please check your internet connection and try again."
exit 1
fi

# Run the command to start the sandbox container
echo "Running: container run --name coderunner --detach --rm --cpus 8 --memory 4g instavm/coderunner"
echo "Running: container run --volume \"$ASSETS_SRC/skills/user:/app/uploads/skills/user\" --volume \"$ASSETS_SRC/outputs:/app/uploads/outputs\" --name coderunner --detach --cpus 8 --memory 4g instavm/coderunner"
if container run \
--volume "$ASSETS_SRC/skills/user:/app/uploads/skills/user" \
--volume "$ASSETS_SRC/outputs:/app/uploads/outputs" \
--name coderunner \
--detach \
--rm \
--cpus 8 \
--memory 4g \
instavm/coderunner; then
echo "✅ Setup complete. MCP server is available at http://coderunner.local:8222/mcp"
else
echo "❌ Failed to start coderunner container. Please check the logs with: container logs coderunner"
exit 1
fi
fi
Loading