-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (23 loc) · 1012 Bytes
/
Dockerfile
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
# --------------------------------------------------------
# Rust Builder
# --------------------------------------------------------
FROM --platform=linux/arm64 rust:1.82.0 as rustbuilder
WORKDIR /ffibench
COPY rust rust
RUN cargo build --release --manifest-path=rust/Cargo.toml
# --------------------------------------------------------
# Go Builder
# --------------------------------------------------------
FROM --platform=linux/arm64 golang:1.22 as gobuilder
WORKDIR /ffibench
COPY . .
COPY --from=rustbuilder /ffibench/rust/target/release/librustffi.a /ffibench/rust/target/release/librustffi.a
COPY --from=rustbuilder /ffibench/rust/target/release/librustffi.h /ffibench/rust/target/release/librustffi.h
ENTRYPOINT [ "/bin/bash" ]
RUN go test -c
# --------------------------------------------------------
# Runner
# --------------------------------------------------------
FROM ubuntu:25.04
COPY --from=gobuilder /ffibench/ffibench.test /bin/ffibench.test
ENTRYPOINT ["/bin/ffibench.test"]