Add Dockerfile
This commit is contained in:
parent
978321b0ce
commit
77f5f62f56
1 changed files with 28 additions and 0 deletions
28
Dockerfile
Normal file
28
Dockerfile
Normal file
|
@ -0,0 +1,28 @@
|
|||
FROM rust:1.34.1-slim-stretch as builder
|
||||
|
||||
RUN apt update && apt install -y pkg-config libssl-dev
|
||||
|
||||
WORKDIR /app
|
||||
RUN mkdir src && touch src/lib.rs
|
||||
COPY Cargo.lock /app
|
||||
COPY Cargo.toml /app
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
ADD . .
|
||||
RUN cargo build --release
|
||||
|
||||
|
||||
FROM debian:stable-slim
|
||||
|
||||
RUN apt update && apt upgrade -y && apt install -y libssl1.1 ca-certificates
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/target/release/endstat /app
|
||||
COPY ./endstat_conf.example.ron /app/endstat_conf.ron
|
||||
COPY templates templates
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["/app/endstat"]
|
Loading…
Reference in a new issue