Files
Cinderwatch/Dockerfile
Phoenix/HotaruBlaze f03e47d9f5
Some checks failed
ci/woodpecker/push/build Pipeline failed
cinderwatch 0.1.0
2026-06-03 21:38:26 +01:00

27 lines
747 B
Docker

FROM rust:1.96.0-slim-trixie AS chef
RUN apt-get update && apt-get install -y pkg-config libssl-dev ca-certificates && rm -rf /var/lib/apt/lists/*
RUN cargo install cargo-chef --locked
WORKDIR /app
FROM chef AS planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --locked --recipe-path recipe.json
COPY . .
RUN cargo build --release --locked
FROM debian:trixie-slim
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/cinderwatch /usr/local/bin/
RUN mkdir /data
VOLUME /data
ENV DISCORD_TOKEN=
ENV DB_PATH=/data/bot.db
WORKDIR /app
CMD ["cinderwatch"]