Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM node:24-slim AS base
FROM node:24.22.1-trixie-slim AS base
WORKDIR /app

# Build toolchain + CLI-install prereqs. curl is needed for the opencode
# installer; git + python3 + make + g++ are for native addon compiles.
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
python3 make g++ curl git ca-certificates unzip xz-utils \
&& rm -rf /var/lib/apt/lists/*
Expand Down Expand Up @@ -34,10 +35,8 @@ RUN curl -fsSL https://opencode.ai/install | bash \
# install with an absolute path. Symlink both into /usr/local/bin so
# they're on PATH at runtime AND survive the /root/.kimi volume mount
# (which only covers auth state).
RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
&& /root/.local/bin/uv tool install --python 3.13 kimi-cli \
&& ln -sf /root/.local/bin/kimi /usr/local/bin/kimi \
&& ln -sf /root/.local/bin/uv /usr/local/bin/uv
COPY scripts/install-harness.sh scripts/python-security-overrides.txt /usr/local/share/cli-bridge/
RUN sh /usr/local/share/cli-bridge/install-harness.sh kimi

# Factory droid, Sourcegraph amp, Forge left out by default — install
# manually on hosts that need them. They change rapidly.
Expand All @@ -50,6 +49,9 @@ RUN corepack enable && corepack prepare pnpm@12.6.0 --activate \
COPY . .
RUN pnpm typecheck

# Native addons are built; keep only the runtime libraries in the serving image.
RUN apt-get purge -y --auto-remove make g++

ENV BRIDGE_HOST=0.0.0.0
ENV BRIDGE_PORT=3344
ENV BRIDGE_DATA_DIR=/data
Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.cli-runtime
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# The bridge's container-pool config bind-mounts only the dirs the
# active backend needs.

FROM node:24-slim
FROM node:24.22.1-trixie-slim

ARG CLI_BRIDGE_HARNESSES=all

Expand All @@ -42,14 +42,15 @@ ARG CLI_BRIDGE_HARNESSES=all
# a net-jailed backend refuses to start rather than run a jail that does not
# deny, so this package is a hard requirement of that mode, not an extra.
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
git ca-certificates dumb-init curl python3 iptables \
&& rm -rf /var/lib/apt/lists/*

# --- CLI installs (Pi is pinned to its qualified RPC version) ---
# Source of truth lives in scripts/install-harness.sh so host installs,
# subset images, and the all-in-one runtime cannot drift.
COPY scripts/install-harness.sh /usr/local/share/cli-bridge/install-harness.sh
COPY scripts/install-harness.sh scripts/python-security-overrides.txt /usr/local/share/cli-bridge/
RUN set -eu; \
if [ "$CLI_BRIDGE_HARNESSES" = "all" ]; then \
sh /usr/local/share/cli-bridge/install-harness.sh all; \
Expand Down
3 changes: 2 additions & 1 deletion scripts/install-harness.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env sh
set -eu

harness_script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
harness="${1:-}"
if [ -z "$harness" ]; then
echo "usage: scripts/install-harness.sh <claude|codex|opencode|kimi|gemini|pi|prime|all>" >&2
Expand Down Expand Up @@ -37,7 +38,7 @@ install_kimi() {
echo "uv install did not produce a uv binary on PATH or ~/.local/bin" >&2
exit 1
fi
"$uv_bin" tool install --python 3.13 kimi-cli
"$uv_bin" tool install --python 3.13 --overrides "$harness_script_dir/python-security-overrides.txt" kimi-cli
if [ -x "${HOME:-/root}/.local/bin/kimi" ]; then
mkdir -p /usr/local/bin 2>/dev/null || true
ln -sf "${HOME:-/root}/.local/bin/kimi" /usr/local/bin/kimi 2>/dev/null || true
Expand Down
2 changes: 2 additions & 0 deletions scripts/python-security-overrides.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Kimi pins an older Pillow; this image owns the audited security override.
pillow==13.0.0