This commit is contained in:
nora 2022-06-28 20:14:45 +02:00
parent a2d7f73960
commit fb9010131f
2 changed files with 27 additions and 0 deletions

25
Dockerfile Normal file
View file

@ -0,0 +1,25 @@
FROM rust as build
RUN rustup toolchain install nightly
RUN rustup default nightly
WORKDIR /app
COPY Cargo.toml Cargo.lock ./
RUN mkdir src
RUN echo "fn main() {}" > src/main.rs
RUN cargo build --release -Zsparse-registry
COPY src ./src
# now rebuild with the proper main
RUN touch src/main.rs
RUN cargo build --release -Zsparse-registry
FROM debian:11.3
WORKDIR /app
COPY --from=build /app/target/release/court-bot court-bot
CMD ["/app/court-bot"]