Files
val-blog/org/ops/SANDBOX_BASELINE_COLIMA.md
T

81 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Sandbox BaselineDocker CLI + Colima
日期:2026-03-10
状态:active
## 1) 当前可用性检查(已通过)
- Docker Client/Server: `29.3.0 / 29.2.1`
- Colima: runningQEMU / x86_64 / runtime=docker
- Docker 引擎信息:
- driver: `overlayfs`
- cgroup: `cgroupfs`
- CPU: `2`
- Memory: `~3.0GB`
- 冒烟测试:`docker run --rm hello-world` 成功
## 2) 基线目标
用于后续 subagent 项目开发、构建、预览与部署演练,确保:
- 环境可复现
- 资源可控
- 日志可追溯
- 故障可回滚
## 3) 资源基线(建议)
- 默认 profile`colima default`
- CPU:2(轻量项目)/ 4(构建型项目)
- Memory3GB(轻量)/ 6GB(中型)
- Disk>= 30GB
> 若项目为前端+SSR或多容器编排,建议先升到 `4C / 6GB`。
## 4) 目录与挂载约定
- Workspace`/Users/guchen/.openclaw/workspace`
- 项目容器挂载统一:`/workspace`
- 项目级缓存:放在项目内 `.cache/`(便于清理)
## 5) 运行约束
- 禁止在沙箱内修改 OpenClaw 主配置
- 生产密钥不得写入镜像层
- 容器默认无特权模式(非必要不加 `--privileged`
## 6) 标准操作
### 启停
```bash
colima start
colima stop
```
### 快速健康检查
```bash
docker version
docker info
docker run --rm hello-world
```
### 项目运行(示例)
```bash
docker run --rm -it \
-v /Users/guchen/.openclaw/workspace:/workspace \
-w /workspace node:20 bash
```
## 7) 故障兜底
- Docker 命令异常:先 `colima status` 确认运行状态
- Socket 异常:重启 Colima
- 镜像/层损坏:
```bash
docker system prune -f
```
## 8) 下一步
- 将 Val Blog 项目接入此基线(docker-compose + 一键预览)
- 增加项目级资源模板(light/medium/high