#13950: fix(docker): add browser sidecar service and health checks
docker
size: S
Cluster:
Docker and Deployment Improvements
## Summary
Improves docker-compose.yml with a browser sidecar service and production-ready defaults.
### Changes
- Add openclaw-browser service built from Dockerfile.sandbox-browser with configurable headless/noVNC modes
- Add health checks for both gateway (HTTP) and browser (CDP) services
- Use GHCR image as default instead of requiring local build
- Wire CDP endpoint from browser to gateway via OPENCLAW_BROWSER_CDP_ENDPOINT env var
- Add default volume paths so it works without an .env file
- Move CLI to cli profile to avoid auto-start with docker compose up
### Motivation
Fixes issues identified in #11553 (invalid YAML syntax, missing health checks).
Related to #6900 (Docker deployment improvements).
### Testing
- docker compose config validates successfully
- Services start with docker compose up and health checks pass
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR updates `docker-compose.yml` to use the GHCR image by default, adds an `openclaw-browser` sidecar built from `Dockerfile.sandbox-browser`, wires the gateway to the sidecar via `OPENCLAW_BROWSER_CDP_ENDPOINT`, and adds healthchecks + `depends_on` gating so the gateway waits for the browser to become healthy. It also moves the CLI service behind a `cli` profile and adds default host volume paths so compose works without an `.env` file.
<h3>Confidence Score: 4/5</h3>
- This PR looks safe to merge and primarily adjusts docker-compose wiring and health checks.
- Review focused on verifying that the new healthchecks match the browser sidecar behavior and that compose syntax is valid. The browser healthcheck is consistent with `Dockerfile.sandbox-browser` (curl is installed and `/json/version` exists). No definite must-fix functional issues were found in the changed file based on repository evidence, though runtime behavior still depends on the GHCR image shipping a Node version with global `fetch`.
- docker-compose.yml
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#11553: feat(docker): add sandbox browser service and documentation
by dangphdh · 2026-02-08
87.9%
#8050: fix: docker hardening
by christopherbarnett96 · 2026-02-03
83.9%
#4695: Fixed the default CLI image to use published GHCR image
by TASMAYU · 2026-01-30
83.4%
#12504: fix: allow docker cli container to connect to gateway
by bvanderdrift · 2026-02-09
83.0%
#11478: Chore: add Dockerfile HEALTHCHECK and debug-log silent catch blocks
by U-C4N · 2026-02-07
82.1%
#9190: feat(docker): Add autonomous container self-restart and runtime pac...
by alexdredmon · 2026-02-05
81.1%
#17506: Fix Entrypoint in docker-compose
by NeilSCGH · 2026-02-15
81.0%
#9992: Docker: Fixed port mapping so ports publish when not stated
by Lightmean03 · 2026-02-06
80.3%
#13953: feat(docker): add .env template and improve Dockerfile
by n24q02m · 2026-02-11
80.0%
#7133: feat: Automated Docker setup with environment-based configuration
by synetalsolutions · 2026-02-02
79.8%