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>
This commit is contained in:
2026-04-21 17:13:07 -07:00
parent 590b5e71fa
commit 6823229136
3 changed files with 22 additions and 27 deletions

View File

@@ -50,6 +50,7 @@ jobs:
custom-rclone-torbox-setup
custom-opencode
custom-qmd
openclaw-runtime-closure
custom-nextcloud-talk-desktop
qt-pinned-jellyfin-media-player
qt-pinned-stremio
@@ -186,8 +187,12 @@ jobs:
- name: Update HelmRelease image tag
run: |
cd k3s-cluster-config
# Update HelmRelease image tags (quoted format: tag: "version")
sed -i 's|tag: ".*"|tag: "${{ needs.build-and-push-openclaw.outputs.image_tag }}"|' \
clusters/oglenet/apps/communication/openclaw.yaml
# Update CronJob image reference (registry:tag format)
sed -i 's|registry.johnogle.info/openclaw:.*|registry.johnogle.info/openclaw:${{ needs.build-and-push-openclaw.outputs.image_tag }}|' \
clusters/oglenet/apps/communication/openclaw.yaml
- name: Commit and push
run: |