@@ -151,29 +151,29 @@ same PVC, then restart the Deployment or StatefulSet.
151151
152152Optional variables accepted by ` scripts/docker/setup.sh ` (and, for the gateway container, by ` docker-compose.yml ` directly):
153153
154- | Variable | Purpose |
155- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
156- | ` OPENCLAW_IMAGE ` | Use a remote image instead of building locally |
157- | ` OPENCLAW_IMAGE_APT_PACKAGES ` | Install extra apt packages during build (space-separated). Legacy alias: ` OPENCLAW_DOCKER_APT_PACKAGES ` |
158- | ` OPENCLAW_IMAGE_PIP_PACKAGES ` | Install extra Python packages during build (space-separated) |
159- | ` OPENCLAW_EXTENSIONS ` | Pre-install plugin dependencies at build time (comma- or space-separated ids) |
160- | ` OPENCLAW_DOCKER_BUILD_NODE_OPTIONS ` | Override the local source-build Node options (default ` --max-old-space-size=8192 ` ) |
161- | ` OPENCLAW_DOCKER_BUILD_TSDOWN_MAX_OLD_SPACE_MB ` | Override the local source-build tsdown heap in MB |
162- | ` OPENCLAW_DOCKER_BUILD_SKIP_DTS ` | Skip declaration output during runtime-only local image builds (default ` 1 ` ) |
163- | ` OPENCLAW_INSTALL_BROWSER ` | Bake Chromium + Xvfb into the image at build time |
164- | ` OPENCLAW_EXTRA_MOUNTS ` | Extra host bind mounts (comma-separated ` source:target[:opts] ` ) |
165- | ` OPENCLAW_HOME_VOLUME ` | Persist ` /home/node ` in a named Docker volume |
166- | ` OPENCLAW_SANDBOX ` | Opt in to sandbox bootstrap (` 1 ` , ` true ` , ` yes ` , ` on ` ) |
167- | ` OPENCLAW_SKIP_ONBOARDING ` | Skip the interactive onboarding step (` 1 ` , ` true ` , ` yes ` , ` on ` ) |
168- | ` OPENCLAW_DOCKER_SOCKET ` | Override the Docker socket path |
169- | ` OPENCLAW_DISABLE_BONJOUR ` | Force Bonjour/mDNS advertising on (` 0 ` ) or off (` 1 ` ); see [ Bonjour / mDNS] ( #bonjour--mdns ) |
170- | ` OPENCLAW_DISABLE_BUNDLED_SOURCE_OVERLAYS ` | Disable bundled plugin source bind-mount overlays |
171- | ` OTEL_EXPORTER_OTLP_ENDPOINT ` | Shared OTLP/HTTP collector endpoint for OpenTelemetry export |
172- | ` OTEL_EXPORTER_OTLP_*_ENDPOINT ` | Signal-specific OTLP endpoints for traces, metrics, or logs |
173- | ` OTEL_EXPORTER_OTLP_PROTOCOL ` | OTLP protocol override. Only ` http/protobuf ` is supported today |
174- | ` OTEL_SERVICE_NAME ` | Service name used for OpenTelemetry resources |
175- | ` OTEL_SEMCONV_STABILITY_OPT_IN ` | Opt in to latest experimental GenAI semantic attributes |
176- | ` OPENCLAW_OTEL_PRELOADED ` | Skip starting a second OpenTelemetry SDK when one is preloaded |
154+ | Variable | Purpose |
155+ | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
156+ | ` OPENCLAW_IMAGE ` | Use a remote image instead of building locally |
157+ | ` OPENCLAW_IMAGE_APT_PACKAGES ` | Install extra apt packages during build (space-separated). Legacy alias: ` OPENCLAW_DOCKER_APT_PACKAGES ` |
158+ | ` OPENCLAW_IMAGE_PIP_PACKAGES ` | Install extra Python packages during build (space-separated) |
159+ | ` OPENCLAW_EXTENSIONS ` | Compile/package supported selected plugins and install their runtime dependencies (comma- or space-separated ids) |
160+ | ` OPENCLAW_DOCKER_BUILD_NODE_OPTIONS ` | Override the local source-build Node options (default ` --max-old-space-size=8192 ` ) |
161+ | ` OPENCLAW_DOCKER_BUILD_TSDOWN_MAX_OLD_SPACE_MB ` | Override the local source-build tsdown heap in MB |
162+ | ` OPENCLAW_DOCKER_BUILD_SKIP_DTS ` | Skip declaration output during runtime-only local image builds (default ` 1 ` ) |
163+ | ` OPENCLAW_INSTALL_BROWSER ` | Bake Chromium + Xvfb into the image at build time |
164+ | ` OPENCLAW_EXTRA_MOUNTS ` | Extra host bind mounts (comma-separated ` source:target[:opts] ` ) |
165+ | ` OPENCLAW_HOME_VOLUME ` | Persist ` /home/node ` in a named Docker volume |
166+ | ` OPENCLAW_SANDBOX ` | Opt in to sandbox bootstrap (` 1 ` , ` true ` , ` yes ` , ` on ` ) |
167+ | ` OPENCLAW_SKIP_ONBOARDING ` | Skip the interactive onboarding step (` 1 ` , ` true ` , ` yes ` , ` on ` ) |
168+ | ` OPENCLAW_DOCKER_SOCKET ` | Override the Docker socket path |
169+ | ` OPENCLAW_DISABLE_BONJOUR ` | Force Bonjour/mDNS advertising on (` 0 ` ) or off (` 1 ` ); see [ Bonjour / mDNS] ( #bonjour--mdns ) |
170+ | ` OPENCLAW_DISABLE_BUNDLED_SOURCE_OVERLAYS ` | Disable bundled plugin source bind-mount overlays |
171+ | ` OTEL_EXPORTER_OTLP_ENDPOINT ` | Shared OTLP/HTTP collector endpoint for OpenTelemetry export |
172+ | ` OTEL_EXPORTER_OTLP_*_ENDPOINT ` | Signal-specific OTLP endpoints for traces, metrics, or logs |
173+ | ` OTEL_EXPORTER_OTLP_PROTOCOL ` | OTLP protocol override. Only ` http/protobuf ` is supported today |
174+ | ` OTEL_SERVICE_NAME ` | Service name used for OpenTelemetry resources |
175+ | ` OTEL_SEMCONV_STABILITY_OPT_IN ` | Opt in to latest experimental GenAI semantic attributes |
176+ | ` OPENCLAW_OTEL_PRELOADED ` | Skip starting a second OpenTelemetry SDK when one is preloaded |
177177
178178The official image ships no Homebrew. During onboarding, OpenClaw hides brew-only skill dependency installers in a Linux container without ` brew ` ; provide those dependencies through a custom image or install manually. Use ` OPENCLAW_IMAGE_APT_PACKAGES ` for Debian-packaged dependencies and ` OPENCLAW_IMAGE_PIP_PACKAGES ` for Python dependencies (runs ` python3 -m pip install --break-system-packages ` at build time, so pin versions and use only indexes you trust).
179179
@@ -183,6 +183,70 @@ If Docker reports `ResourceExhausted`, `cannot allocate memory`, or aborts durin
183183OPENCLAW_DOCKER_BUILD_NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_DOCKER_BUILD_TSDOWN_MAX_OLD_SPACE_MB=4096
184184```
185185
186+ ### Source-built images with selected plugins
187+
188+ ` OPENCLAW_EXTENSIONS ` selects plugin manifest ids from the source checkout;
189+ existing source-directory names are also accepted when they differ. The Docker
190+ build resolves the selection to source directories once, installs production
191+ dependencies, and, when a selected plugin is published separately with
192+ ` openclaw.build.bundledDist: false ` , compiles its runtime into the root bundled
193+ dist. This Docker-only packaging does not change the plugin's npm or ClawHub
194+ artifact contract. Unknown, invalid, or ambiguous ids fail the image build.
195+ Known dependency/source-only ids keep their existing source and dependency
196+ staging without gaining a compiled root dist entry. A selected plugin with
197+ unified build entries must compile successfully; unselected external plugin
198+ source and runtime output are pruned.
199+
200+ For example, these commands build separate, multi-architecture standalone
201+ FakeCo gateway images for ClickClack, Slack, and Microsoft Teams. ClawRouter is
202+ already part of the root OpenClaw runtime, so the ClickClack image selects only
203+ ` clickclack ` . The explicit empty browser argument keeps the default image free
204+ of Chromium:
205+
206+ ``` bash
207+ SOURCE_SHA=" $( git rev-parse HEAD) "
208+ BUILD_TIMESTAMP=" $( date -u +%Y-%m-%dT%H:%M:%SZ) "
209+ REGISTRY=" registry.example.com/fakeco"
210+
211+ build_gateway_image () {
212+ gateway=" $1 "
213+ selected_plugin=" $2 "
214+ docker buildx build \
215+ --platform linux/amd64,linux/arm64 \
216+ --build-arg " GIT_COMMIT=${SOURCE_SHA} " \
217+ --build-arg " OPENCLAW_BUILD_TIMESTAMP=${BUILD_TIMESTAMP} " \
218+ --build-arg " OPENCLAW_EXTENSIONS=${selected_plugin} " \
219+ --build-arg OPENCLAW_INSTALL_BROWSER= \
220+ --provenance=mode=max \
221+ --sbom=true \
222+ --tag " ${REGISTRY} /openclaw-${gateway} :${SOURCE_SHA} " \
223+ --push \
224+ .
225+ }
226+
227+ build_gateway_image clickclack clickclack
228+ build_gateway_image slack slack
229+ build_gateway_image teams msteams
230+ ```
231+
232+ Use ` --platform linux/arm64 --load ` or ` --platform linux/amd64 --load ` for a
233+ single native local build. Multi-platform output and attached SBOM/provenance
234+ require a registry or another Buildx output that preserves attestations. After
235+ pushing, inspect the manifest and deploy the immutable digest rather than the
236+ mutable source-SHA tag:
237+
238+ ``` bash
239+ docker buildx imagetools inspect \
240+ " ${REGISTRY} /openclaw-clickclack:${SOURCE_SHA} "
241+ # Deploy: registry.example.com/fakeco/openclaw-clickclack@sha256:<manifest-digest>
242+ ```
243+
244+ These images are for standalone OCI-based gateways and generic Docker users.
245+ Crabhelm-managed gateways do not consume them: that delivery path builds a
246+ separate x86_64 appliance archive containing an OpenClaw npm tarball and pins
247+ the Node, archive, and manifest digests. Build that appliance independently
248+ from the same landed OpenClaw source.
249+
186250To test bundled plugin source against a packaged image, mount one plugin source directory over its packaged source path, e.g. ` OPENCLAW_EXTRA_MOUNTS=/path/to/fork/extensions/synology-chat:/app/extensions/synology-chat:ro ` . That overrides the matching compiled ` /app/dist/extensions/synology-chat ` bundle for the same plugin id.
187251
188252### Observability
0 commit comments