aboutsummaryrefslogtreecommitdiff
path: root/cluster/prod/app/plume/build/plume/Dockerfile
blob: 1f57a52850adc6ae34c02afba72288076c5b1bef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM rust:1.58.1-slim-bullseye as builder

RUN apt-get update && \
    apt-get install -y \
      pkg-config \
      git \
      curl \
      postgresql \
      postgresql-contrib \
      libpq-dev \
      gettext \
      git \
      python \
      curl \
      gcc \
      make \
      openssl \
      libssl-dev \
      libclang-dev

ARG VERSION
WORKDIR /opt
RUN git clone -n https://git.joinplu.me/Plume/Plume.git plume

WORKDIR /opt/plume
RUN git checkout ${VERSION}

WORKDIR /opt/plume/script
RUN chmod a+x ./wasm-deps.sh && ./wasm-deps.sh

WORKDIR /opt/plume
RUN cargo install wasm-pack
RUN chmod a+x ./script/plume-front.sh && ./script/plume-front.sh
RUN cargo install --path ./ --force --no-default-features --features postgres
RUN cargo install --path plume-cli --force --no-default-features --features postgres
RUN cargo clean

#-----------------------------
FROM debian:bullseye-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates \
    libpq5 \
    libssl1.1 \
    rclone \
    fuse

WORKDIR /app

COPY --from=builder /opt/plume /app
COPY --from=builder /usr/local/cargo/bin/plm /usr/local/bin/
COPY --from=builder /usr/local/cargo/bin/plume /usr/local/bin/

CMD ["plume"]