-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (15 loc) · 578 Bytes
/
Dockerfile
File metadata and controls
26 lines (15 loc) · 578 Bytes
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
FROM messense/rust-musl-cross:x86_64-musl as chef
RUN cargo install cargo-chef
WORKDIR /app
FROM chef as planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
FROM chef as builder
COPY --from=planner /app/recipe.json .
RUN cargo chef cook --release --target x86_64-unknown-linux-musl --recipe-path recipe.json
COPY . .
RUN cargo build --release --target x86_64-unknown-linux-musl
FROM scratch
LABEL maintainer="Noah Dunbar <noah@noahdunbar.com>"
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/minebot /minebot
ENTRYPOINT [ "/minebot" ]