Dockerfile 563 B

12345678910111213141516171819202122232425
  1. # This Dockerfile is composed of two steps: the first one builds the release
  2. # binary, and then the binary is copied inside another, empty image.
  3. #################
  4. # Build image #
  5. #################
  6. FROM rust:1.42 AS build
  7. COPY . .
  8. RUN cargo test --release --all
  9. RUN cargo build --release
  10. ##################
  11. # Output image #
  12. ##################
  13. FROM ubuntu:bionic AS binary
  14. RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
  15. ca-certificates
  16. COPY --from=build /target/release/triagebot /usr/local/bin/
  17. ENV PORT=80
  18. CMD triagebot