BallBot/Dockerfile

17 lines
335 B
Docker
Raw Normal View History

2024-11-10 12:11:07 -06:00
# Build stage
FROM rust:1.75 as builder
WORKDIR /usr/src/app
COPY . .
RUN apt install openssl -y -q
2024-11-10 12:11:07 -06:00
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
2024-11-10 12:30:21 -06:00
COPY --from=builder /usr/src/app/target/release/ball-bot .
CMD ["./ball-bot"]