mirror of
https://github.com/Noratrieb/discord-court-bot.git
synced 2026-01-14 09:55:02 +01:00
docker
This commit is contained in:
parent
a2d7f73960
commit
fb9010131f
2 changed files with 27 additions and 0 deletions
2
.dockerignore
Normal file
2
.dockerignore
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
target
|
||||||
|
.env
|
||||||
25
Dockerfile
Normal file
25
Dockerfile
Normal 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"]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue