Commit 18347cf
committed
fix(docker): pin container-side workspace and config dirs in compose
scripts/docker/setup.sh writes the host-side OPENCLAW_WORKSPACE_DIR and
OPENCLAW_CONFIG_DIR (e.g. /Users/<you>/.openclaw/...) into .env so Compose
can use them as bind-mount sources. Both gateway and CLI services then
imported the same .env via env_file, so inside the Linux container the env
vars carried host-style paths. After 04.29 this regressed: the first agent
reply died with 'EACCES: permission denied, mkdir /Users' when the wizard
or runtime resolved a workspace from those env values.
Override OPENCLAW_CONFIG_DIR and OPENCLAW_WORKSPACE_DIR in the environment:
block on both services so the container always sees /home/node/.openclaw
and /home/node/.openclaw/workspace, regardless of what .env carries for
Compose substitution. Compose's environment: takes precedence over
env_file:, so the bind-mount source still uses the host path while the
in-container env stays correct.
Add a sync test alongside the existing docker-compose contract tests that
locks the override on both services so this contract cannot regress
silently.
Fixes #77436.1 parent 0e702f1 commit 18347cf
3 files changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
11 | 19 | | |
12 | 20 | | |
13 | 21 | | |
| |||
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
88 | 100 | | |
89 | 101 | | |
90 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
626 | 638 | | |
0 commit comments