Merge pull request #23 from glide-the/fix-sanbox

Refactor Dockerfile entrypoint and update README instructions
This commit is contained in:
Xinlu Lai 2025-08-14 01:55:28 +08:00 committed by GitHub
commit 5e3e230eed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 16 deletions

View File

@ -50,21 +50,8 @@ WORKDIR /workspace
# Create the entrypoint script directly in the container
RUN cat << 'EOF' > /entrypoint.sh
#!/bin/sh
# Generate random workspace directory name with timestamp and random suffix
WORKSPACE_DIR="/workspace_$(date +%s)_$(head /dev/urandom | tr -dc a-z0-9 | head -c 8)"
# Create the workspace directory
mkdir -p "$WORKSPACE_DIR"
# Mount bind the random workspace to the default /workspace directory
mount --bind "$WORKSPACE_DIR" /workspace
# Change to the workspace directory
cd "$WORKSPACE_DIR" || exit 1
/root/.bun/bin/bun /app/cli.js "$@"
/root/.bun/bin/bun /app/cli.js -c /workspace "$@"
EOF
RUN chmod +x /entrypoint.sh

View File

@ -61,7 +61,7 @@ git clone https://github.com/shareAI-lab/Kode.git
cd Kode
# Build the image locally
docker build -t Kode .
docker build --no-cache -t Kode .
# Run in your project directory
cd your-project

View File

@ -58,7 +58,7 @@ git clone https://github.com/shareAI-lab/Kode.git
cd Kode
# 本地构建镜像
docker build -t Kode .
docker build --no-cache -t Kode .
# 在你的项目目录中运行
cd your-project