Files
clawmates/deploy/clawmates-runtime/Dockerfile
T
Omar SobhandClaude Opus 4.8 2e889df35e Runtime: native Kimi Code CLI alongside Claude (kimi_cli provider, live)
Runtime image now installs Node 22 (nodesource) + both agent CLIs —
@anthropic-ai/claude-code and @moonshot-ai/kimi-code — so the zeroclaw
daemon can spawn `kimi -p` for the new kimi_cli provider on a Kimi
membership, parallel to `claude -p` (claude_cli). Kimi needs Node >=22.19;
the image was on Node 18.

Documents the kimi_cli worker recipe in agent.config.example.toml (the
coding endpoint is User-Agent gated → drive Kimi through its own CLI, not a
raw OpenAI-compat client) and keeps GLM via the registry family.

Deployed & verified on gw-04: coordinator (claude_cli) answers "Anthropic
built me", worker_kimi (kimi_cli) answers "I am Kimi, built by Moonshot AI"
— heterogeneous Claude + Kimi on one runtime, over /ws/chat.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-17 11:06:03 -07:00

41 lines
2.0 KiB
Docker

# Slim Clawmates runtime = the zeroclaw daemon (gateway API), API-only.
# Simple full-source build (avoids the upstream Dockerfile's stale manifest-
# prefetch step). web/dist may be empty → dashboard is omitted, /api/* works.
# Requires BuildKit (cache mounts). Build context = the zeroclaw source tree.
# syntax=docker/dockerfile:1
# bookworm-pinned so the binary's glibc matches the bookworm runtime stage
FROM rust:1.94-slim-bookworm AS build
RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config build-essential cmake libssl-dev ca-certificates git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
# Ensure the gateway's include_dir!("../../web/dist") target exists at compile time.
RUN mkdir -p web/dist
RUN --mount=type=cache,id=cm-cargo-registry,target=/usr/local/cargo/registry,sharing=locked \
--mount=type=cache,id=cm-cargo-git,target=/usr/local/cargo/git,sharing=locked \
--mount=type=cache,id=cm-target-bookworm,target=/app/target,sharing=locked \
cargo build --release --locked --bin zeroclaw \
&& cp target/release/zeroclaw /usr/local/bin/zeroclaw
FROM debian:bookworm-slim
# ca-certificates for TLS; Node 22 (Kimi Code needs >=22.19; Claude Code is fine
# on it too) to install BOTH agent CLIs that the subprocess providers spawn:
# `claude -p` (claude_cli, Claude subscription) and `kimi -p` (kimi_cli, Kimi
# membership) — subscription-backed, no per-minute API TPM ceiling.
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl gnupg \
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& npm install -g @anthropic-ai/claude-code @moonshot-ai/kimi-code \
&& npm cache clean --force \
&& rm -rf /var/lib/apt/lists/* /root/.npm
COPY --from=build /usr/local/bin/zeroclaw /usr/local/bin/zeroclaw
ENV HOME=/zeroclaw-data \
ZEROCLAW_WORKSPACE=/zeroclaw-data/workspace \
ZEROCLAW_GATEWAY_PORT=42617
RUN mkdir -p /zeroclaw-data/workspace
EXPOSE 42617
ENTRYPOINT ["zeroclaw"]
CMD ["daemon"]