-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (21 loc) · 942 Bytes
/
Copy pathDockerfile
File metadata and controls
23 lines (21 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# The whole harness: both binaries, a base image, and whatever you mount.
#
# Build: docker build -t clank .
# Use: git log -1 | docker run --rm -i --network=host \
# -e CLANK_BASE_URL=... -e CLANK_MODEL=... clank -m "what changed?"
#
# `-i` is what makes the pipe reach it. `--network=host` is what makes a model on
# localhost reachable — and it is also the limit of the sandbox: the container
# bounds what the model can *write*, not what it can *reach* (PROTOCOL.md).
#
# Not alpine. clank is glibc-dynamic; musl has no loader for it.
FROM rust:1-slim AS build
WORKDIR /src
COPY Cargo.toml Cargo.lock ./
COPY src ./src
RUN cargo build --release
FROM ubuntu:24.04
COPY --from=build /src/target/release/clank /usr/local/bin/clank
COPY --from=build /src/target/release/clank-jev /usr/local/bin/clank-jev
ENTRYPOINT ["/usr/local/bin/clank"]
# `clank-jev` is in the image too: docker run --rm -i clank-jev --provider kev …