-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (26 loc) · 1.54 KB
/
Copy pathDockerfile
File metadata and controls
33 lines (26 loc) · 1.54 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
# ── Planner stage ─────────────────────────────────────────────────────────────
FROM lukemathwalker/cargo-chef:latest-rust-1 AS planner
WORKDIR /build
COPY . .
# Drop the Tauri desktop crate from the workspace before planning — it pulls in
# gdk-sys / webkit2gtk which require GTK system headers not present in this
# slim builder image. The Docker image ships only the `ace` CLI binary.
RUN sed -i '/"ui\/tauri"/d' Cargo.toml
RUN cargo chef prepare --recipe-path recipe.json
# ── Builder stage ─────────────────────────────────────────────────────────────
FROM lukemathwalker/cargo-chef:latest-rust-1 AS builder
WORKDIR /build
COPY --from=planner /build/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
COPY . .
RUN sed -i '/"ui\/tauri"/d' Cargo.toml
RUN cargo build --package ace --release
# ── Runtime stage ─────────────────────────────────────────────────────────────
FROM debian:bookworm-slim AS runtime
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /build/target/release/ace /usr/local/bin/ace
WORKDIR /scenarios
ENTRYPOINT ["ace"]
CMD ["--help"]