2019-05-01 21:08:08 -07:00
|
|
|
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
|
|
|
|
|
2019-05-01 21:31:45 -07:00
|
|
|
COPY src/ src/
|
2019-05-01 21:08:08 -07:00
|
|
|
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
|
2019-05-01 22:51:27 -07:00
|
|
|
COPY ./config /app/config
|
2019-05-01 23:26:05 -07:00
|
|
|
RUN mv /app/config/endstat_conf.example.ron /app/config/endstat_conf.ron
|
2019-05-01 21:08:08 -07:00
|
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
CMD ["/app/endstat"]
|