From 1e437ea3a19fea904f54bdc86072f4b7e24687a9 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Sun, 10 Nov 2024 13:11:07 -0500 Subject: [PATCH] added dockerfile --- Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a87d4a9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +# Build stage +FROM rust:1.75 as builder +WORKDIR /usr/src/app +COPY . . +RUN cargo build --release + +# Test stage +FROM builder as test +RUN cargo test + +# Production stage +FROM debian:bookworm-slim as production +WORKDIR /usr/src/app +COPY --from=builder /usr/src/app/target/release/ballbot . +CMD ["./ballbot"]