Skip to content

Commit e0fd176

Browse files
committed
change dependency for os compatibility
1 parent c90e77b commit e0fd176

File tree

4 files changed

+154
-20
lines changed

4 files changed

+154
-20
lines changed

Cargo.lock

Lines changed: 141 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async-trait = "0.1"
6161
thiserror = "2"
6262
tracing = "0.1"
6363
arc-swap = "1"
64-
reqwest = { version = "0.12", features = ["json", "stream"] }
64+
reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "rustls-tls"] }
6565

6666
# ── Feature-gated optional dependencies ──────────────────────────────────────
6767

crates/example-eventage-claw/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ thiserror = "2"
2323
anyhow = "1"
2424
clap = { version = "4", features = ["derive"] }
2525
dirs = "5"
26-
reqwest = { version = "0.12", features = ["json", "stream"] }
26+
reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "rustls-tls"] }
2727
futures-util = "0.3"
2828
ratatui = { version = "0.29", features = ["unstable-rendered-line-info"] }
2929
crossterm = { version = "0.28", features = ["event-stream"] }
Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# syntax=docker/dockerfile:1
2-
# ── Stage 1: install cargo-chef ───────────────────────────────────────────────
2+
# Builds a fully static musl binary — runs on any Linux, no GLIBC version requirement.
3+
4+
# ── Stage 1: install cargo-chef + musl toolchain ─────────────────────────────
35
FROM rust:1-slim AS chef
46
RUN apt-get update \
5-
&& apt-get install -y --no-install-recommends pkg-config libssl-dev \
7+
&& apt-get install -y --no-install-recommends musl-tools ca-certificates \
68
&& rm -rf /var/lib/apt/lists/*
9+
RUN rustup target add x86_64-unknown-linux-musl
710
RUN cargo install cargo-chef --locked
811
WORKDIR /build
912

@@ -15,27 +18,23 @@ RUN cargo chef prepare --recipe-path recipe.json
1518
# ── Stage 3: pre-compile dependencies (cached layer) ─────────────────────────
1619
FROM chef AS builder
1720
COPY --from=planner /build/recipe.json recipe.json
18-
RUN cargo chef cook --release -p example-eventage-claw --recipe-path recipe.json
21+
RUN cargo chef cook --release --target x86_64-unknown-linux-musl \
22+
-p example-eventage-claw --recipe-path recipe.json
1923

2024
# Build the actual binary (only re-runs when source changes)
2125
COPY . .
22-
RUN cargo build --release -p example-eventage-claw
26+
RUN cargo build --release --target x86_64-unknown-linux-musl -p example-eventage-claw
2327

2428
# ── Stage 4: minimal runtime image ────────────────────────────────────────────
25-
FROM debian:12-slim AS runtime
26-
RUN apt-get update \
27-
&& apt-get install -y --no-install-recommends ca-certificates libssl3 \
28-
&& rm -rf /var/lib/apt/lists/*
29+
FROM alpine:3 AS runtime
30+
RUN apk add --no-cache ca-certificates
2931

30-
COPY --from=builder /build/target/release/claw /usr/local/bin/claw
32+
COPY --from=builder /build/target/x86_64-unknown-linux-musl/release/claw /usr/local/bin/claw
3133

3234
# Persistent data directory: config, skills, memory, tasks, event log.
33-
# Mount a volume or bind-mount a host directory here.
3435
VOLUME ["/root/.claw"]
3536

3637
EXPOSE 3000
3738

3839
ENTRYPOINT ["claw"]
39-
# Override CMD to pass extra flags, e.g.:
40-
# docker run ... claw --http-port 3000 --log /root/.claw/events.jsonl
4140
CMD ["--no-tui", "--http-port", "3000"]

0 commit comments

Comments
 (0)