1 | FROM alpine:3 AS build |
2 | |
3 | RUN apk add build-base cargo cmake clang17 clang17-libs clang17-libclang rust |
4 | |
5 | RUN cargo install --force --locked bindgen-cli |
6 | |
7 | WORKDIR /src |
8 | |
9 | COPY . /src |
10 | |
11 | RUN export PATH="/root/.cargo/bin:$PATH" && cargo test && cargo build --release |
12 | |
13 | FROM alpine:3 |
14 | |
15 | RUN apk add libgcc |
16 | |
17 | COPY --from=build /src/target/release/maitred-debug /usr/bin/ |
18 | |
19 | CMD /usr/bin/maitred-debug |