mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
* Bump MSRV to 1.92 and add GCP deployment files rig-core 0.30 uses let_chains (stabilized post-1.87), which breaks builds on Rust 1.85. Bump rust-version in Cargo.toml and both Dockerfiles to 1.92 (verified working). Add cloud deployment scaffolding: - Dockerfile: multi-stage build for the main agent container - deploy/cloud-sql-proxy.service: systemd unit for Cloud SQL Auth Proxy - deploy/ironclaw.service: systemd unit for the IronClaw container - deploy/setup.sh: VM bootstrap script (Docker, proxy, services) - deploy/env.example: reference environment configuration Co-Authored-By: Claude Opus 4.6 <[email protected]> * Address review feedback: harden deploy scaffolding - Add comment explaining GATEWAY_HOST=0.0.0.0 and when to use 127.0.0.1 - Document /opt/ironclaw ownership model (root-owned, Docker reads as root) - Switch cloud-sql-proxy service from User=root to DynamicUser=yes Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: Resolve clippy lints (Rust 1.93) and fix CI test workflow - Fix 97 collapsible_if warnings using let-chains syntax (auto-fixed) - Fix ptr_arg: change &PathBuf to &Path in pairing store functions - Fix suspicious_open_options: add .truncate(false) to OpenOptions - Fix too_many_arguments: add clippy allow on execute_status - Fix unnecessary_unwrap: use if-let in repository.rs hybrid_search - Gate unused EchoTool with #[cfg(test)] - Add PairingStore argument to ChannelStoreData::new() test call sites - Add skip guard for bundled channel test when WASM artifacts unavailable - Split CI test workflow to exclude PostgreSQL-dependent integration tests Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: Address review feedback from ilblackdragon - Add root check to setup.sh (exits with error if not root) - Add warning comment to env.example about placeholder passwords - Dockerfile.worker already uses rust:1.92 (no change needed) - PR #41 overlap noted; will rebase after #41 merges Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: resolve 47 collapsible_if clippy warnings Collapse nested if statements across the codebase to satisfy clippy::collapsible_if on Rust 1.93. Co-Authored-By: Claude Opus 4.6 <[email protected]> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
64 lines
1.8 KiB
Docker
64 lines
1.8 KiB
Docker
# Multi-stage Dockerfile for the IronClaw worker container.
|
|
#
|
|
# This image runs the ironclaw binary in worker mode inside Docker containers.
|
|
# The orchestrator creates instances of this image for sandboxed job execution.
|
|
#
|
|
# Build:
|
|
# docker build -f Dockerfile.worker -t ironclaw-worker .
|
|
#
|
|
# The image includes common development tools so workers can build software,
|
|
# run tests, and execute shell commands.
|
|
|
|
FROM rust:1.92-bookworm AS builder
|
|
|
|
WORKDIR /build
|
|
COPY . .
|
|
|
|
# Build only the ironclaw binary (release mode)
|
|
RUN cargo build --release --bin ironclaw
|
|
|
|
# ---
|
|
|
|
FROM debian:bookworm-slim
|
|
|
|
# Install common development tools
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
curl \
|
|
git \
|
|
build-essential \
|
|
pkg-config \
|
|
libssl-dev \
|
|
nodejs \
|
|
npm \
|
|
python3 \
|
|
python3-pip \
|
|
python3-venv \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Rust toolchain for the sandbox user
|
|
ENV RUSTUP_HOME=/usr/local/rustup \
|
|
CARGO_HOME=/usr/local/cargo \
|
|
PATH=/usr/local/cargo/bin:$PATH
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.92.0 \
|
|
&& chmod -R a+r /usr/local/rustup /usr/local/cargo
|
|
|
|
# Install Claude Code CLI (for claude-bridge mode)
|
|
RUN npm install -g @anthropic-ai/claude-code@latest
|
|
|
|
# Copy the binary
|
|
COPY --from=builder /build/target/release/ironclaw /usr/local/bin/ironclaw
|
|
|
|
# Create non-root user (UID 1000 matches the orchestrator's container config)
|
|
RUN useradd -m -u 1000 -s /bin/bash sandbox \
|
|
&& mkdir -p /workspace \
|
|
&& chown sandbox:sandbox /workspace \
|
|
&& mkdir -p /home/sandbox/.claude \
|
|
&& chown sandbox:sandbox /home/sandbox/.claude
|
|
|
|
USER sandbox
|
|
WORKDIR /workspace
|
|
|
|
# The orchestrator passes the full command via Docker cmd.
|
|
ENTRYPOINT ["ironclaw"]
|