2020-07-02 12:46:56 +02:00
|
|
|
FROM rust:1-buster as builder
|
2018-09-03 21:45:17 +02:00
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
2019-01-09 17:48:18 +01:00
|
|
|
ca-certificates \
|
2018-09-03 21:45:17 +02:00
|
|
|
gettext \
|
|
|
|
postgresql-client \
|
|
|
|
libpq-dev \
|
|
|
|
git \
|
|
|
|
curl \
|
|
|
|
gcc \
|
|
|
|
make \
|
|
|
|
openssl \
|
2020-01-15 10:03:52 +01:00
|
|
|
libssl-dev \
|
|
|
|
clang
|
2019-01-09 17:48:18 +01:00
|
|
|
|
2018-12-31 18:46:20 +01:00
|
|
|
WORKDIR /scratch
|
|
|
|
COPY script/wasm-deps.sh .
|
2019-01-09 17:48:18 +01:00
|
|
|
RUN chmod a+x ./wasm-deps.sh && sleep 1 && ./wasm-deps.sh
|
|
|
|
|
2018-09-03 21:45:17 +02:00
|
|
|
WORKDIR /app
|
2018-12-31 18:46:20 +01:00
|
|
|
COPY Cargo.toml Cargo.lock rust-toolchain ./
|
2021-02-11 19:37:37 +01:00
|
|
|
RUN cargo install wasm-pack
|
2019-01-09 17:48:18 +01:00
|
|
|
|
2018-09-03 21:45:17 +02:00
|
|
|
COPY . .
|
2019-01-09 17:48:18 +01:00
|
|
|
|
|
|
|
RUN chmod a+x ./script/plume-front.sh && sleep 1 && ./script/plume-front.sh
|
2018-12-22 18:27:21 +01:00
|
|
|
RUN cargo install --path ./ --force --no-default-features --features postgres
|
2018-10-07 20:12:10 +02:00
|
|
|
RUN cargo install --path plume-cli --force --no-default-features --features postgres
|
2018-12-23 15:24:55 +01:00
|
|
|
RUN cargo clean
|
2019-01-09 17:48:18 +01:00
|
|
|
|
2020-07-02 12:46:56 +02:00
|
|
|
FROM debian:buster-slim
|
2019-01-09 17:48:18 +01:00
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
ca-certificates \
|
|
|
|
libpq5 \
|
|
|
|
libssl1.1
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY --from=builder /app /app
|
|
|
|
COPY --from=builder /usr/local/cargo/bin/plm /bin/
|
|
|
|
COPY --from=builder /usr/local/cargo/bin/plume /bin/
|
2021-03-28 17:34:30 +02:00
|
|
|
COPY --from=builder /usr/local/cargo/bin/remove-dup-images /bin/
|
2019-01-09 17:48:18 +01:00
|
|
|
|
2018-10-06 12:59:39 +02:00
|
|
|
CMD ["plume"]
|
2019-01-09 17:48:18 +01:00
|
|
|
|
2018-09-03 21:45:17 +02:00
|
|
|
EXPOSE 7878
|