Add miniclawd and 0claw/zero-claw to image; optional install script
Made-with: Cursor
This commit is contained in:
parent
99e7df77ba
commit
1abf2d5dcd
13
Dockerfile
13
Dockerfile
|
|
@ -1,3 +1,7 @@
|
||||||
|
# Build zero-claw (minimal Rust agent runtime); only binary copied into main image
|
||||||
|
FROM rust:1-bookworm AS zeroclaw-builder
|
||||||
|
RUN cargo install zero-claw
|
||||||
|
|
||||||
# Kasm workspace with OpenClaw pre-installed
|
# Kasm workspace with OpenClaw pre-installed
|
||||||
# Gateway runs on port 18789; expose in Kasm Workspace config
|
# Gateway runs on port 18789; expose in Kasm Workspace config
|
||||||
FROM kasmweb/debian-bookworm-desktop:1.18.0-rolling-daily
|
FROM kasmweb/debian-bookworm-desktop:1.18.0-rolling-daily
|
||||||
|
|
@ -15,8 +19,13 @@ RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
||||||
&& apt-get install -y nodejs \
|
&& apt-get install -y nodejs \
|
||||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# OpenClaw (global install, no interactive prompts)
|
# OpenClaw + miniclawd (global install, no interactive prompts)
|
||||||
RUN npm install -g openclaw@latest
|
RUN npm install -g openclaw@latest \
|
||||||
|
&& npm install -g miniclawd@latest
|
||||||
|
|
||||||
|
# zero-claw / 0claw (single binary from Rust build stage)
|
||||||
|
COPY --from=zeroclaw-builder /usr/local/cargo/bin/0claw /usr/local/bin/0claw
|
||||||
|
RUN ln -sf /usr/local/bin/0claw /usr/local/bin/zero-claw
|
||||||
|
|
||||||
# Pre-create OpenClaw directories with correct ownership (1000:1000 = kasm-user)
|
# Pre-create OpenClaw directories with correct ownership (1000:1000 = kasm-user)
|
||||||
RUN mkdir -p $HOME/.openclaw/canvas $HOME/.openclaw/cron $HOME/.openclaw/workspace \
|
RUN mkdir -p $HOME/.openclaw/canvas $HOME/.openclaw/cron $HOME/.openclaw/workspace \
|
||||||
|
|
|
||||||
|
|
@ -245,6 +245,8 @@ OpenClaw also supports **iMessage** (macOS only; uses `imsg` and Messages DB), *
|
||||||
This desktop includes:
|
This desktop includes:
|
||||||
|
|
||||||
- **OpenClaw** - AI agent orchestration (port 18789)
|
- **OpenClaw** - AI agent orchestration (port 18789)
|
||||||
|
- **miniclawd** - Lightweight Node AI assistant (`miniclawd onboard`, then `miniclawd agent -m "Hello!"`)
|
||||||
|
- **0claw / zero-claw** - Minimal Rust agent runtime (`0claw` or `zero-claw`; copy `0claw.toml.example` to `0claw.toml` and configure)
|
||||||
- **Cursor** - AI-powered code editor
|
- **Cursor** - AI-powered code editor
|
||||||
- **VS Code** - Microsoft Visual Studio Code
|
- **VS Code** - Microsoft Visual Studio Code
|
||||||
- **Antigravity** - Google's AI IDE with Gemini
|
- **Antigravity** - Google's AI IDE with Gemini
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Install miniclawd (npm) and zero-claw/0claw (prebuilt binary when available)
|
||||||
|
# into the RUNNING clawtainer via docker exec. No image rebuild.
|
||||||
|
# Run after: docker compose up -d
|
||||||
|
set -e
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
CONTAINER="${CLAWTAINER_CONTAINER:-clawtainer}"
|
||||||
|
OPENCLAW_USER=1000
|
||||||
|
|
||||||
|
if ! docker ps --format '{{.Names}}' | grep -q "^${CONTAINER}$"; then
|
||||||
|
echo "Container ${CONTAINER} is not running. Start with: docker compose up -d"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing miniclawd (npm global)..."
|
||||||
|
docker exec -u "$OPENCLAW_USER" "$CONTAINER" npm install -g miniclawd@latest
|
||||||
|
|
||||||
|
echo "Installing zero-claw / 0claw..."
|
||||||
|
docker exec -u root "$CONTAINER" bash -c '
|
||||||
|
set -e
|
||||||
|
INSTALL_DIR=/usr/local/bin
|
||||||
|
ARCH=$(uname -m)
|
||||||
|
case "$ARCH" in
|
||||||
|
x86_64|amd64) TRIPLE="x86_64-unknown-linux-gnu" ;;
|
||||||
|
aarch64|arm64) TRIPLE="aarch64-unknown-linux-gnu" ;;
|
||||||
|
*) echo " Unsupported arch: $ARCH; skip zero-claw binary"; exit 0 ;;
|
||||||
|
esac
|
||||||
|
if command -v 0claw >/dev/null 2>&1; then
|
||||||
|
echo " 0claw already installed: $(0claw --version 2>/dev/null || true)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
# Try GitHub releases (paean-ai/0claw may add assets later)
|
||||||
|
REPO="paean-ai/0claw"
|
||||||
|
TAG=$(curl -sSfL "https://api.github.com/repos/${REPO}/releases/latest" 2>/dev/null | grep -o "\"tag_name\": *\"[^\"]*\"" | cut -d\" -f4 || true)
|
||||||
|
if [ -z "$TAG" ]; then
|
||||||
|
echo " zero-claw: no prebuilt releases for this repo yet."
|
||||||
|
echo " To install manually (with Rust): cargo install zero-claw"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
for suffix in "0claw-${TRIPLE}.tar.gz" "zeroclaw-${TRIPLE}.tar.gz" "0claw-${ARCH}-linux.tar.gz"; do
|
||||||
|
URL="https://github.com/${REPO}/releases/download/${TAG}/${suffix}"
|
||||||
|
if curl -sSfL -o /tmp/zc.tar.gz "$URL" 2>/dev/null; then
|
||||||
|
tar xzf /tmp/zc.tar.gz -C /tmp
|
||||||
|
BIN=$(find /tmp -maxdepth 2 -type f -name "0claw" -o -name "zeroclaw" 2>/dev/null | head -1)
|
||||||
|
if [ -n "$BIN" ]; then
|
||||||
|
mv "$BIN" "$INSTALL_DIR/0claw"
|
||||||
|
chmod +x "$INSTALL_DIR/0claw"
|
||||||
|
rm -rf /tmp/zc.tar.gz /tmp/0claw* /tmp/zeroclaw* 2>/dev/null || true
|
||||||
|
echo " zero-claw installed at $INSTALL_DIR/0claw"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo " zero-claw: no matching prebuilt binary; install with: cargo install zero-claw"
|
||||||
|
'
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Done. Installed:"
|
||||||
|
echo " - miniclawd (run: miniclawd onboard, then miniclawd agent -m \"Hello!\")"
|
||||||
|
echo " - zero-claw / 0claw (if prebuilt was available; run: 0claw)"
|
||||||
|
echo ""
|
||||||
Loading…
Reference in New Issue