update dockerfile: no longer build on run

This commit is contained in:
2024-10-10 11:17:42 -04:00
parent 7976ac28c0
commit e20f28d2d0

View File

@@ -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"]