Dockerfile 413 B

123456789101112131415
  1. FROM rust:alpine AS builder
  2. RUN apk add --no-cache musl-dev
  3. WORKDIR /app
  4. COPY . .
  5. RUN cargo build --release
  6. # Replace "rubyfetch_server_secondary" with the package name in your Cargo.toml
  7. RUN cp target/release/discord-bot ./myapp
  8. FROM alpine:latest
  9. WORKDIR /app
  10. COPY --from=builder /app/myapp .
  11. # COPY --from=builder /app/assets ./assets
  12. # COPY --from=builder /app/dist ./dist
  13. ENV MODE=production
  14. CMD ["./myapp"]