#17104: fix(clawdock): include docker-compose.extra.yml in compose commands
scripts
stale
size: XS
Cluster:
Docker and Deployment Improvements
Fixes #17083
## Problem
The `_clawdock_compose` function only loads `docker-compose.yml`, missing `docker-compose.extra.yml` which contains `OPENCLAW_HOME_VOLUME` configuration.
## Solution
Include the extra compose file if it exists:
```bash
local extra_file="${CLAWDOCK_DIR}/docker-compose.extra.yml"
if [[ -f "$extra_file" ]]; then
compose_args="$compose_args -f $extra_file"
fi
```
## Impact
- Users can now use `OPENCLAW_HOME_VOLUME` environment variable with clawdock
- Docker volumes will be properly mounted when using custom home directories
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR fixes `_clawdock_compose` to include `docker-compose.extra.yml` when present, which enables features like `OPENCLAW_HOME_VOLUME` for users of the clawdock shell helpers. The fix is conceptually correct and aligns with how `docker-setup.sh` and the docs recommend running compose with both files.
- The compose arguments are stored in a plain string variable and expanded unquoted, which will break if `CLAWDOCK_DIR` contains spaces. An array (like `docker-setup.sh` uses) should be used instead to preserve proper quoting.
<h3>Confidence Score: 3/5</h3>
- The fix is logically correct but introduces a quoting regression that breaks paths with spaces
- The intent and conditional logic are sound, but the switch from a quoted variable to an unquoted string expansion is a regression from the original code's space-safe handling. This will fail for users whose CLAWDOCK_DIR path contains spaces.
- `scripts/shell-helpers/clawdock-helpers.sh` — the `_clawdock_compose` function needs to use an array instead of a plain string for compose arguments
<sub>Last reviewed commit: 6347dfc</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#17506: Fix Entrypoint in docker-compose
by NeilSCGH · 2026-02-15
77.2%
#12504: fix: allow docker cli container to connect to gateway
by bvanderdrift · 2026-02-09
77.1%
#7061: Add additional variable to the docker-compose file (default off) to...
by aupeachmo · 2026-02-02
76.5%
#3513: fix(docker): add MOLTBOT_STATE_DIR to resolve permission error
by Suksham-sharma · 2026-01-28
76.0%
#23313: feat(docker): add optional build-arg OPENCLAW_INSTALL_DOCKER_CLI to...
by zhuxuwei88-bot · 2026-02-22
76.0%
#8050: fix: docker hardening
by christopherbarnett96 · 2026-02-03
75.4%
#7986: feature/OPENCLAW_IMAGE
by ozbillwang · 2026-02-03
74.7%
#6698: feat: Add CLI wrapper for Docker integration and update documentation
by barshopen · 2026-02-01
74.7%
#13950: fix(docker): add browser sidecar service and health checks
by n24q02m · 2026-02-11
74.5%
#17916: [ fix ] : correct config directory path during onboarding
by Dijo-404 · 2026-02-16
74.1%