aboutsummaryrefslogtreecommitdiff
path: root/app/build/plume/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'app/build/plume/Dockerfile')
-rw-r--r--app/build/plume/Dockerfile25
1 files changed, 21 insertions, 4 deletions
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