Commit Graph

26 Commits

Author SHA1 Message Date
Coy Geek
8ae2d5110f fix(docker): pin base images to SHA256 digests (#7734)
* fix(docker): pin base images to SHA256 digests for supply chain security

Pin all 9 Dockerfiles to immutable SHA256 digests to prevent supply chain
attacks where a compromised upstream image could be silently pulled into
production builds.

Also add Docker ecosystem to Dependabot configuration for automated
digest updates.

Images pinned:
- node:22-bookworm@sha256:cd7bcd2e7a1e6f72052feb023c7f6b722205d3fcab7bbcbd2d1bfdab10b1e935
- node:22-bookworm-slim@sha256:3cfe526ec8dd62013b8843e8e5d4877e297b886e5aace4a59fec25dc20736e45
- debian:bookworm-slim@sha256:98f4b71de414932439ac6ac690d7060df1f27161073c5036a7553723881bffbe
- ubuntu:24.04@sha256:cd1dba651b3080c3686ecf4e3c4220f026b521fb76978881737d24f200828b2b

Fixes #7731

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

* test(docker): add digest pinning regression coverage

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-19 12:42:07 -08:00
Gustavo Madeira Santana
22b2a77b30 Revert "fix(docker): ensure memory-lancedb deps installed in Docker image"
This reverts commit 2ab6313d99.
2026-02-16 20:27:19 -05:00
Gustavo Madeira Santana
63aa5c5a45 Revert "fix: remove stderr suppression so install failures are visible in build logs"
This reverts commit 717caa97fb.
2026-02-16 20:27:19 -05:00
Gustavo Madeira Santana
37064e5cc6 Revert "feat(docker): add init script support via /openclaw-init.d/"
This reverts commit 53af9f7437.
2026-02-16 20:25:46 -05:00
JayMishra-github
27a4868c2d fix: move Chromium install after pnpm install and use playwright-core/cli.js
Address review feedback:
- Move the OPENCLAW_INSTALL_BROWSER block after pnpm install so
  playwright-core is available in node_modules
- Use node /app/node_modules/playwright-core/cli.js instead of
  npx playwright to avoid npm override conflicts in Docker

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 23:52:30 +01:00
JayMishra-github
d6aa9adec5 feat(docker): add optional Chromium + Xvfb install in Docker image
Adds a build arg OPENCLAW_INSTALL_BROWSER that, when set, pre-installs
Chromium (via Playwright) and Xvfb into the Docker image. This eliminates
the 60-90 second Playwright install that otherwise happens on every
container start when browser features are used.

Usage:
  docker build --build-arg OPENCLAW_INSTALL_BROWSER=1 -t openclaw:browser .

Without the build arg, behavior is unchanged (no Chromium in image).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 23:52:30 +01:00
JayMishra-github
53af9f7437 feat(docker): add init script support via /openclaw-init.d/
Adds an ENTRYPOINT script that runs user-provided init scripts from
/openclaw-init.d/ before starting the gateway. This is the standard
Docker pattern (used by nginx, postgres, etc.) for customizing container
startup without overriding the entire entrypoint.

Usage:
  docker run -v ./my-init-scripts:/openclaw-init.d:ro openclaw

Scripts must be executable. Non-executable files are skipped with a
warning. Scripts run in alphabetical order with output prefixed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 23:52:26 +01:00
JayMishra-github
717caa97fb fix: remove stderr suppression so install failures are visible in build logs
Address review feedback: remove 2>/dev/null so that if the LanceDB
native binary download fails, the error is visible in Docker build
logs for debugging rather than silently swallowed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 23:52:23 +01:00
JayMishra-github
2ab6313d99 fix(docker): ensure memory-lancedb deps installed in Docker image
The memory-lancedb extension declares openai and @lancedb/lancedb as
dependencies, but these may not be available at runtime due to pnpm
hoisting behavior with native bindings. This adds an explicit install
step after the build to ensure the extension's dependencies are present.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 23:52:23 +01:00
Tak Hoffman
72f89b1f53 Docker: include A2UI sources for bundle (#13114)
* Docker: include A2UI sources for bundle

* Build: fail bundling when sources missing and no prebuilt A2UI bundle
2026-02-09 22:44:59 -06:00
Peter Steinberger
80d42eb0ba fix(docker): support .mjs entrypoints in images and e2e 2026-02-07 00:22:34 -08:00
Rishi Vhavle
bb3d7343f4 fix(docker): remove --bind lan from default CMD to work out of the box
Addresses review feedback: --bind lan requires auth token, so default
CMD should bind to loopback only.

For container platforms needing LAN binding for health checks:
1. Set OPENCLAW_GATEWAY_TOKEN env var
2. Override CMD: ["node","dist/index.js","gateway","--allow-unconfigured","--bind","lan"]
2026-02-02 17:38:37 +05:30
Rishi Vhavle
1a05ee941e fix(docker): add gateway subcommand and cloud-compatible flags
The Dockerfile CMD runs without arguments, causing the CLI to print
help and exit with code 1. This breaks deployment on container
platforms (Render, Railway, Fly.io, etc.) that rely on the CMD.

Changes:
- Add `gateway` subcommand to start the server
- Add `--allow-unconfigured` to allow startup without config file
- Add `--bind lan` to bind to 0.0.0.0 instead of localhost
  (required for container health checks)

Fixes #5685
2026-02-02 17:38:37 +05:30
Peter Steinberger
85cd55e22b chore: bump to 2026.2.1 2026-02-02 08:51:54 +00:00
cpojer
76361ae3ab revert: Switch back to tsc for compiling. 2026-01-31 18:31:49 +09:00
cpojer
67945e8d62 chore: Switch from TypeScript to build with tsdown, speeds up pnpm build by 5-10x. 2026-01-31 15:25:37 +09:00
Ayaan Zaidi
1168f59890 perf: skip redundant ui install in Dockerfile 2026-01-30 16:25:24 +05:30
Peter Steinberger
9a7160786a refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
Peter Steinberger
e4518d2271 fix: allow docker builds to skip missing a2ui assets 2026-01-27 15:16:20 +00:00
rhuanssauro
592930f10f security: apply Agents Council recommendations
- Add USER node directive to Dockerfile for non-root container execution
- Update SECURITY.md with Node.js version requirements (CVE-2025-59466, CVE-2026-21636)
- Add Docker security best practices documentation
- Document detect-secrets usage for local security scanning

Reviewed-by: Agents Council (5/5 approval)
Security-Score: 8.8/10
Watchdog-Verdict: SAFE WITH CONDITIONS

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-26 13:39:14 +00:00
tosh-hamburg
de5fb65cb8 fix: docker-setup fails on Synology because of problem with bun (#1002) 2026-01-16 10:03:56 +00:00
Peter Steinberger
6833e3de5d fix: harden docker apt install (#697) (thanks @gabriel-trigo) 2026-01-11 03:27:48 +01:00
Gabriel Trigo
ff14e743ea feat(docker): optional apt packages in docker-setup 2026-01-11 03:26:05 +01:00
Zach Knickerbocker
c6fc7c2ea6 Docker: cache deps layer for faster rebuilds (#605) 2026-01-09 14:23:06 -06:00
Lukáš Loukota
c16510c6ea fix: install Bun in Dockerfile (#284)
Install Bun in Dockerfile so `pnpm build` can run Bun scripts inside Docker.

Thanks @loukotal.
2026-01-06 14:05:19 +00:00
ddyo
8d4c6d41ab Docker: add root-level setup 2026-01-02 13:53:06 +02:00