-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
68 lines (53 loc) · 2.25 KB
/
Dockerfile
File metadata and controls
68 lines (53 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# ── Stage 1: Build all daemon binaries ─────────────────────────────────────────
FROM rust:1.89-bookworm AS builder
ARG TARGETARCH=amd64
ARG BUILDARCH=amd64
WORKDIR /src
# Copy workspace and crates
COPY Cargo.toml Cargo.lock ./
COPY .cargo .cargo
COPY crates crates
# Build daemon binaries with optimized release profile
# Uses workspace settings: strip=true, lto=thin, codegen-units=1, opt-level=z
RUN cargo build --release --locked \
-p orchestrator-cli \
-p agent-runner \
-p llm-cli-wrapper
# Verify binaries exist
RUN ls -lh target/release/animus target/release/agent-runner target/release/llm-cli-wrapper
# ── Stage 2: Minimal runtime image ──────────────────────────────────────────────
FROM debian:bookworm-slim
# Install runtime dependencies + Node.js
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
openssh-client \
openssl \
unzip \
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install AI coding tools
RUN npm install -g @anthropic-ai/claude-code @openai/codex \
&& npm cache clean --force
# Install OpenCode (Go binary)
RUN ARCH=$(dpkg --print-architecture) \
&& curl -fsSL "https://github.com/opencode-ai/opencode/releases/latest/download/opencode_linux_${ARCH}" -o /usr/local/bin/opencode \
&& chmod +x /usr/local/bin/opencode
# Create .ao directory for state
RUN mkdir -p /root/.ao
# Copy binaries from builder
COPY --from=builder /src/target/release/animus /usr/local/bin/animus
COPY --from=builder /src/target/release/agent-runner /usr/local/bin/agent-runner
COPY --from=builder /src/target/release/llm-cli-wrapper /usr/local/bin/llm-cli-wrapper
# Create working directory
WORKDIR /workspace
# Expose daemon port (for web server if enabled)
EXPOSE 8080
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD animus status 2>/dev/null || exit 1
# Default entrypoint
ENTRYPOINT ["animus"]
CMD ["daemon", "start"]