Commit Graph

6 Commits

Author SHA1 Message Date
6823229136 refactor(openclaw): thin Docker image with Nix deps offloaded to Harmonia
Some checks failed
CI / check (push) Successful in 1m52s
CI / build-and-cache (push) Successful in 5m13s
CI / Build & Push OpenClaw Image (push) Successful in 25m34s
CI / Deploy OpenClaw to Cluster (push) Failing after 4s
Strips runtime packages (nodejs_22, kubectl, jq, git, emacs, tsx, tea, pythonEnv, qmd) from the Docker image contents, reducing image size from ~2.7GB to ~1.5GB.

Key changes:
- Removed 9 runtime packages from contents (moved to openclaw-runtime-closure)
- Removed pythonEnv let binding and qmd parameter (no longer needed in image)
- Added OPENCLAW_RUNTIME_CLOSURE env var (bakes closure path for init container)
- Added runtime closure bin dir to PATH (resolves after PVC population)
- Added curl to contents (needed by init container for Harmonia health checks)
- CI: added openclaw-runtime-closure to build-and-cache PACKAGES array
- CI: added second sed command for CronJob image tag update
- CI: removed inherit qmd from openclaw-image callPackage (qmd now in runtime closure)

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-21 17:13:07 -07:00
590b5e71fa feat(openclaw): add runtime closure meta-package for Harmonia caching
Creates openclaw-runtime-closure as a symlinkJoin of all runtime dependencies (nodejs_22, kubectl, jq, git, emacs, tsx, tea, python3.withPackages pymupdf, qmd) that will be pushed to the Harmonia binary cache by CI and pulled into the PVC by the init container at pod startup.

This meta-package enables the thin Docker image architecture where:
- The Docker image stays small (~1.5GB vs 2.7GB) with only /app, nix, and basics
- Runtime deps are fetched from Harmonia at pod startup via nix copy --from
- CI push is fast (thin image) and runtime deps are cached separately

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-21 17:12:50 -07:00
2036181a04 fix: set HOME=/home/node in openclaw image to prevent /.openclaw mkdir errors
Some checks failed
CI / check (push) Failing after 1m58s
CI / build-and-cache (push) Has been skipped
CI / Build & Push OpenClaw Image (push) Has been skipped
CI / Deploy OpenClaw to Cluster (push) Has been skipped
2026-04-19 21:08:18 -07:00
e3348e3319 feat: add QMD v2.1.0 as Nix package, bake into openclaw image
Some checks failed
CI / check (push) Failing after 1m41s
CI / build-and-cache (push) Has been skipped
CI / Build & Push OpenClaw Image (push) Has been skipped
CI / Deploy OpenClaw to Cluster (push) Has been skipped
- packages/qmd: buildNpmPackage with Node.js 22 (not Bun) to avoid
  native module ABI issues with better-sqlite3 and sqlite-vec
- Vendored package-lock.json (QMD ships bun.lock, not npm lockfile)
- packages/openclaw-image: adds qmd + tsx to image contents
- packages/default.nix: rec attrset so openclaw-image can inherit qmd
- flake.nix: expose custom-qmd package output for CI caching
2026-04-19 20:52:26 -07:00
af496ce9ca fix(openclaw): copy /app as real directory to avoid symlink escape check
Some checks failed
CI / check (push) Failing after 2m5s
CI / build-and-cache (push) Has been skipped
CI / Build & Push OpenClaw Image (push) Has been skipped
CI / Deploy OpenClaw to Cluster (push) Has been skipped
The OpenClaw runtime validates that resolved symlinks stay within
/app/dist/extensions/. When /app was a Nix store symlink, realpath
resolved to /nix/store/ which 'escaped' the boundary. Now we copy
the app files into /app as a real directory in extraCommands.
2026-04-19 16:58:07 -07:00
3faad15a02 feat(openclaw): add Nix-built Docker image with app extraction from upstream
Pure Nix buildLayeredImage that extracts /app from upstream ghcr.io/openclaw/openclaw
via manifest-aware Python script. Avoids fromImage which breaks Debian
dynamic linker by shadowing /lib -> usr/lib symlink.

Includes: nix, nodejs_22, kubectl, jq, curl, git, emacs, python3+pymupdf, tea.
Custom NSS with node user (UID 1000). Replicated docker-entrypoint.sh.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-19 16:38:04 -07:00