steelbot/Dockerfile
caelum0x 4b2262e406 feat: Steelbot — autonomous AI agent with USDC wallet on Base
Synthesis Hackathon submission. Built on IronClaw fork.

26 tools: Locus payments (6), Uniswap DeFi (3), onchain reads (3),
security scanning (2), wallet analytics (3), OpenRouter LLM (2),
self-hosted scraping (3), portfolio (2), synthesis (2).

3 defense hooks: spending limits ($5/tx, $25/session), contract guard
(SCONE-bench vulnerability patterns), credential guard (blocks private
key/seed phrase leaks).

Payment system (Polar.sh), landing page, license key gating (Free/Pro/
Unlimited tiers), brand rename from IronClaw to Steelbot.

9,669 lines of code. 3,665 tests passing. Zero clippy warnings.
Real USDC transactions on Base chain.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 01:53:00 +03:00

65 lines
1.7 KiB
Docker

# Multi-stage Dockerfile for Steelbot (production deployment).
#
# Build:
# docker build --platform linux/amd64 -t steelbot:latest .
#
# Run:
# docker run --env-file .env -p 3000:3000 steelbot:latest
# Stage 1: Build
FROM rust:1.92-slim-bookworm AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config libssl-dev cmake gcc g++ \
&& rm -rf /var/lib/apt/lists/* \
&& rustup target add wasm32-wasip2 \
&& cargo install wasm-tools
WORKDIR /app
# Copy manifests first for layer caching
COPY Cargo.toml Cargo.lock ./
COPY crates/ crates/
# Create a dummy main to cache dependency compilation
RUN mkdir -p src && \
echo 'fn main() { println!("dummy"); }' > src/main.rs && \
echo '' > src/lib.rs && \
cargo build --release --bin ironclaw 2>/dev/null || true && \
rm -rf src/
# Copy source, build script, tests, and supporting directories
COPY build.rs build.rs
COPY src/ src/
COPY tests/ tests/
COPY migrations/ migrations/
COPY registry/ registry/
COPY channels-src/ channels-src/
COPY wit/ wit/
COPY providers.json providers.json
# [[bench]] entries in Cargo.toml require bench sources to exist for cargo to parse the manifest
COPY benches/ benches/
RUN cargo build --release --bin ironclaw
# Stage 2: Runtime
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates libssl3 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/ironclaw /usr/local/bin/steelbot
COPY --from=builder /app/migrations /app/migrations
# Non-root user
RUN useradd -m -u 1000 -s /bin/bash steelbot
USER steelbot
EXPOSE 3000
ENV RUST_LOG=ironclaw=info
ENTRYPOINT ["steelbot"]
CMD ["run"]