- FROM rust:alpine AS builder
- RUN apk add --no-cache musl-dev
- WORKDIR /app
- COPY . .
- RUN cargo build --release
- # Replace "rubyfetch_server_secondary" with the package name in your Cargo.toml
- RUN cp target/release/discord-bot ./myapp
- FROM alpine:latest
- WORKDIR /app
- COPY --from=builder /app/myapp .
- # COPY --from=builder /app/assets ./assets
- # COPY --from=builder /app/dist ./dist
- ENV MODE=production
- CMD ["./myapp"]
|