From e20f28d2d00e40410daff632bc1aa4d84b2f526a Mon Sep 17 00:00:00 2001 From: minneelyyyy Date: Thu, 10 Oct 2024 11:17:42 -0400 Subject: [PATCH] update dockerfile: no longer build on run --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2fa4bae..25cacce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM rust:1.81 +FROM rust:1.81 AS builder WORKDIR /usr/src/bot COPY . . -# FROM ubuntu:24.10 -# COPY --from=builder /usr/local/cargo/bin/bot /usr/local/bin/bot +RUN cargo --install --path . -# temporary fix for slow cross compile builds. -# this will simply compile and run the code on `docker run` -CMD ["cargo", "run", "--release"] +FROM ubuntu:24.10 +COPY --from=builder /usr/local/cargo/bin/bot /usr/local/bin/bot + +CMD ["bot"]