openclaw/docs
jamtujest cb491dfde5
feat(docker): add opt-in sandbox support for Docker deployments (#29974)
* feat(docker): add opt-in sandbox support for Docker deployments

Enable Docker-based sandbox isolation via OPENCLAW_SANDBOX=1 env var
in docker-setup.sh. This is a prerequisite for agents.defaults.sandbox
to function in any Docker deployment (self-hosted, Hostinger, DigitalOcean).

Changes:
- Dockerfile: add OPENCLAW_INSTALL_DOCKER_CLI build arg (~50MB, opt-in)
- docker-compose.yml: add commented-out docker.sock mount with docs
- docker-setup.sh: auto-detect Docker socket, inject mount, detect GID,
  build sandbox image, configure sandbox defaults, add group_add

All changes are opt-in. Zero impact on existing deployments.

Usage: OPENCLAW_SANDBOX=1 ./docker-setup.sh

Closes #29933
Related: #7575, #7827, #28401, #10361, #12505, #28326

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address code review feedback on sandbox support

- Persist OPENCLAW_SANDBOX, DOCKER_GID, OPENCLAW_INSTALL_DOCKER_CLI
  to .env via upsert_env so group_add survives re-runs
- Show config set errors instead of swallowing them silently;
  report partial failure when sandbox config is incomplete
- Warn when Dockerfile.sandbox is missing but sandbox config
  is still applied (sandbox image won't exist)
- Fix non-canonical whitespace in apt sources.list entry
  by using printf instead of echo with line continuation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: remove `local` outside function and guard sandbox behind Docker CLI check

- Remove `local` keyword from top-level `sandbox_config_ok` assignment
  which caused script exit under `set -euo pipefail` (bash `local`
  outside a function is an error)
- Add Docker CLI prerequisite check for pre-built (non-local) images:
  runs `docker --version` inside the container and skips sandbox setup
  with a clear warning if the CLI is missing
- Split sandbox block so config is only applied after prerequisites pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: defer docker.sock mount until sandbox prerequisites pass

Move Docker socket mounting from the early setup phase (before image
build/pull) to a dedicated compose overlay created only after:
1. Docker CLI is verified inside the container image
2. /var/run/docker.sock exists on the host

Previously the socket was mounted optimistically at startup, leaving
the host Docker daemon exposed even when sandbox setup was later
skipped due to missing Docker CLI. Now the gateway starts without
the socket, and a docker-compose.sandbox.yml overlay is generated
only when all prerequisites pass. The gateway restart at the end of
sandbox setup picks up both the socket mount and sandbox config.

Also moves group_add from write_extra_compose() into the sandbox
overlay, keeping all sandbox-specific compose configuration together.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs(docker): fix sandbox docs URL in setup output

* Docker: harden sandbox setup fallback behavior

* Tests: cover docker-setup sandbox edge paths

* Docker: roll back sandbox mode on partial config failure

* Tests: assert sandbox mode rollback on partial setup

* Docs: document Docker sandbox bootstrap env controls

* Changelog: credit Docker sandbox bootstrap hardening

* Update CHANGELOG.md

* Docker: verify Docker apt signing key fingerprint

* Docker: avoid sandbox overlay deps during policy writes

* Tests: assert no-deps sandbox rollback gateway recreate

* Docs: mention OPENCLAW_INSTALL_DOCKER_CLI in Docker env vars

---------

Co-authored-by: Jakub Karwowski <jakubkarwowski@Mac.lan>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-03-01 23:06:10 -08:00
..
.i18n fix(docs): revert accidental es/pt-BR translation scaffold from #18473 2026-02-17 02:23:41 +01:00
assets docs: add Vercel sponsorship (#29270) 2026-03-02 06:25:46 +00:00
automation fix(cron): add retry policy for one-shot jobs on transient errors (#24355) (openclaw#24435) thanks @hugenshen 2026-03-01 06:58:03 -06:00
channels fix(channels): add optional defaultAccount routing 2026-03-02 04:03:46 +00:00
cli feat(config): add `openclaw config validate` and improve startup error messages (#31220) 2026-03-02 00:45:51 -05:00
concepts docs: sync android node docs with current pairing and capabilities 2026-03-02 11:08:51 +05:30
debug Docs: enable markdownlint autofixables except list numbering (#10476) 2026-02-06 10:08:59 -05:00
design feat: Add Kilo Gateway provider (#20212) 2026-02-23 23:29:27 +00:00
diagnostics Docs: add nav titles across docs (#5689) 2026-01-31 15:04:03 -06:00
experiments Discord: thread bindings idle + max-age lifecycle (#27845) (thanks @osolmaz) 2026-02-27 10:02:39 +01:00
gateway feat: add PDF analysis tool with native provider support (#31319) 2026-03-01 22:39:12 -08:00
help docs: sync android node docs with current pairing and capabilities 2026-03-02 11:08:51 +05:30
images Docs: add screenshot showing model picker usability issue 2026-02-17 09:15:55 +01:00
install feat(docker): add opt-in sandbox support for Docker deployments (#29974) 2026-03-01 23:06:10 -08:00
ja-JP Docs: add all unlisted docs routes to navigation (#31027) 2026-03-01 15:09:35 -08:00
nodes docs: sync android node docs with current pairing and capabilities 2026-03-02 11:08:51 +05:30
platforms docs: sync android node docs with current pairing and capabilities 2026-03-02 11:08:51 +05:30
plugins docs: add WeChat community plugin listing 2026-02-24 08:41:28 -06:00
providers docs: replace bare provider URLs with markdown links 2026-03-02 06:01:29 +00:00
refactor docs: update outbound refactor test path 2026-02-22 21:28:08 +01:00
reference test: split fast lane from channel and gateway suites 2026-03-02 05:33:07 +00:00
security docs: add missing summary/read_when metadata 2026-02-22 20:45:09 +01:00
start docs: consolidate grammy links to telegram 2026-02-27 08:00:29 +05:30
tools feat: add PDF analysis tool with native provider support (#31319) 2026-03-01 22:39:12 -08:00
web Exec/ACP: inject OPENCLAW_SHELL into child shell env (#31271) 2026-03-01 20:31:06 -08:00
zh-CN fix(subagents): return completion message for manual session spawns 2026-02-18 02:52:35 +01:00
CNAME refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
brave-search.md Docs: enable markdownlint autofixables except list numbering (#10476) 2026-02-06 10:08:59 -05:00
ci.md docs: add missing summaries and read_when hints 2026-02-22 20:37:02 +01:00
date-time.md Docs: add nav titles across docs (#5689) 2026-01-31 15:04:03 -06:00
docs.json Docs: add all unlisted docs routes to navigation (#31027) 2026-03-01 15:09:35 -08:00
index.md docs: sync android node docs with current pairing and capabilities 2026-03-02 11:08:51 +05:30
logging.md Feat/logger support log level validation0222 (#23436) 2026-02-22 11:15:13 +01:00
nav-tabs-underline.js docs(ui): add animated underline for nav tabs (#21912) 2026-02-20 09:33:46 -05:00
network.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
perplexity.md Docs: enable markdownlint autofixables except list numbering (#10476) 2026-02-06 10:08:59 -05:00
pi-dev.md docs: replace removed pi test script with current commands 2026-02-22 21:07:34 +01:00
pi.md fix(pi): stop history image reinjection token blowup 2026-02-26 16:38:20 +01:00
prose.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
style.css fix(ios): force tls for non-loopback manual gateway hosts (#21969) 2026-02-20 16:28:47 +00:00
tts.md fix(tts): make model provider overrides opt-in 2026-02-21 13:16:07 +01:00
vps.md CLI: add root --help fast path and lazy channel option resolution (#30975) 2026-03-01 14:23:46 -08:00
whatsapp-openclaw-ai-zh.jpg Docs: add zh-CN landing notice + AI image 2026-02-02 18:35:01 +01:00
whatsapp-openclaw.jpg refactor: rename to openclaw 2026-01-30 03:16:21 +01:00