Clawdock 持久化挂载不生效:把 docker-compose.extra.yml 纳入 helper 命令
问题/场景:`clawdock-*` 命令只读 `docker-compose.yml`,导致 extra 挂载(如 OPENCLAW_HOME_VOLUME)被静默忽略。前置条件:你使用 clawdock helper 并依赖持久卷或自定义挂载。实施步骤:确认 extra 文件已生成、更新 helper 逻辑以同时传入两个 compose 文件、再做挂载回归验证。关键命令:`docker compose -f docker-compose.yml -f docker-compose.extra.yml ...`。验证:容器 Mounts 出现预期卷。风险:compose 文件顺序错误会覆盖配置。
GITHUBDiscovered 2026-02-15Author zerone0x
Prerequisites
- You are running OpenClaw via clawdock helper scripts with optional `docker-compose.extra.yml` present.
- Persistent home volume or custom bind mounts are required for your workflow.
Steps
- Generate/confirm `docker-compose.extra.yml` (for example via `docker-setup.sh`) and check it includes expected volume mounts.
- Ensure clawdock helper composes both files: base + extra, rather than base only.
- Start containers through helper command and inspect container mounts (`docker inspect ... | grep -A5 Mounts`).
- Re-run stop/start cycle once to verify mounts persist across lifecycle operations.
Commands
source scripts/shell-helpers/clawdock-helpers.shclawdock-startdocker inspect openclaw-openclaw-gateway-1 | grep -A5 MountsVerify
`docker inspect` shows expected persistent mounts and data survives container restart.
Caveats
- If helper scripts are still on older revision, they may ignore extra compose file until upgraded(需验证).
- Compose merge order matters; wrong file order can silently override desired mounts.
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗