From 25ec221248904c14bf1e7283620121c52c244437 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 14 Oct 2020 21:27:43 +0200 Subject: WIP plume container --- app/build/plume/Dockerfile | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'app/build/plume/Dockerfile') diff --git a/app/build/plume/Dockerfile b/app/build/plume/Dockerfile index 7796fbb..9199e1e 100644 --- a/app/build/plume/Dockerfile +++ b/app/build/plume/Dockerfile @@ -1,9 +1,7 @@ -FROM debian:bullseye-slim as builder +FROM rust:1.47.0-slim-buster as builder RUN apt-get update && \ apt-get install -y \ - rustc \ - cargo \ pkg-config \ git \ curl \ @@ -32,8 +30,27 @@ RUN cargo install diesel_cli --no-default-features --features postgres --version RUN cargo install cargo-web RUN cargo web deploy -p plume-front --release # backend -RUN cargo install --no-default-features --features postgres -f +RUN cargo install --no-default-features --features postgres -f --path . # cli RUN cargo install --no-default-features --features postgres --path plume-cli +RUN cargo clean +#----------------------------- +FROM debian:bullseye-slim +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + libpq5 \ + libssl1.1 + +WORKDIR /app + +COPY --from=builder /opt/plume /app +COPY --from=builder /usr/local/cargo/bin/diesel /usr/local/bin/ +COPY --from=builder /usr/local/cargo/bin/plm /usr/local/bin/ +COPY --from=builder /usr/local/cargo/bin/plume /usr/local/bin/ +COPY plm-start /usr/local/bin/ + +CMD ["plm-start"] + +EXPOSE 7878 -- cgit v1.2.3