Dockerfile 610 B

12345678910111213141516171819202122
  1. # Build
  2. FROM rust:1.74.0 AS builder
  3. WORKDIR /usr/src/
  4. RUN rustup target add x86_64-unknown-linux-gnu
  5. RUN apt update && apt install libssl-dev
  6. RUN USER=root cargo new receqif
  7. WORKDIR /usr/src/receqif
  8. COPY Cargo.toml Cargo.lock ./
  9. RUN cargo build --release --features "docker"
  10. COPY src ./src
  11. RUN cargo install --target x86_64-unknown-linux-gnu --features "docker" --path .
  12. # Bundle
  13. FROM gcr.io/distroless/cc-debian12
  14. COPY --from=builder /usr/local/cargo/bin/receqif /bin/receqif
  15. USER 1000
  16. ARG TELEGRAM_TOKEN
  17. ENV TELOXIDE_TOKEN=$TELEGRAM_TOKEN
  18. VOLUME ["/etc/receqif"]
  19. ENTRYPOINT ["/bin/receqif", "--telegram"]