2024-05-25 20:09:45 +00:00
|
|
|
FROM rust:1.75.0 as builder
|
2024-05-23 22:18:27 +00:00
|
|
|
|
|
|
|
WORKDIR /usr/src/chaospott-status
|
|
|
|
COPY . .
|
2024-05-25 20:09:45 +00:00
|
|
|
|
|
|
|
# use musl to create a truly static binary https://bxbrenden.github.io/
|
|
|
|
RUN rustup component add rust-std-x86_64-unknown-linux-musl
|
|
|
|
RUN cargo build --release --target x86_64-unknown-linux-musl
|
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=builder /usr/src/chaospott-status/target/x86_64-unknown-linux-musl/release/chaospott-status /chaospott-status
|
2024-05-23 22:18:27 +00:00
|
|
|
|
|
|
|
EXPOSE 3000
|
|
|
|
|
2024-05-25 20:09:45 +00:00
|
|
|
CMD ["/chaospott-status"]
|