2019-01-09 16:48:18 +00:00
|
|
|
FROM rust:1-stretch as builder
|
2018-09-03 19:45:17 +00:00
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
2019-01-09 16:48:18 +00:00
|
|
|
ca-certificates \
|
2018-09-03 19:45:17 +00:00
|
|
|
gettext \
|
|
|
|
postgresql-client \
|
|
|
|
libpq-dev \
|
|
|
|
git \
|
|
|
|
curl \
|
|
|
|
gcc \
|
|
|
|
make \
|
|
|
|
openssl \
|
2020-01-15 09:03:52 +00:00
|
|
|
libssl-dev \
|
|
|
|
clang
|
2019-01-09 16:48:18 +00:00
|
|
|
|
2018-12-31 17:46:20 +00:00
|
|
|
WORKDIR /scratch
|
|
|
|
COPY script/wasm-deps.sh .
|
2019-01-09 16:48:18 +00:00
|
|
|
RUN chmod a+x ./wasm-deps.sh && sleep 1 && ./wasm-deps.sh
|
|
|
|
|
2018-09-03 19:45:17 +00:00
|
|
|
WORKDIR /app
|
2018-12-31 17:46:20 +00:00
|
|
|
COPY Cargo.toml Cargo.lock rust-toolchain ./
|
2018-12-25 10:51:40 +00:00
|
|
|
RUN cargo install cargo-web
|
2019-01-09 16:48:18 +00:00
|
|
|
|
2018-09-03 19:45:17 +00:00
|
|
|
COPY . .
|
2019-01-09 16:48:18 +00:00
|
|
|
|
|
|
|
RUN chmod a+x ./script/plume-front.sh && sleep 1 && ./script/plume-front.sh
|
2018-12-22 17:27:21 +00:00
|
|
|
RUN cargo install --path ./ --force --no-default-features --features postgres
|
2018-10-07 18:12:10 +00:00
|
|
|
RUN cargo install --path plume-cli --force --no-default-features --features postgres
|
2018-12-23 14:24:55 +00:00
|
|
|
RUN cargo clean
|
2019-01-09 16:48:18 +00:00
|
|
|
|
|
|
|
FROM debian:stretch-slim
|
|
|
|
|
|
|
|
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/
|
|
|
|
|
2018-10-06 10:59:39 +00:00
|
|
|
CMD ["plume"]
|
2019-01-09 16:48:18 +00:00
|
|
|
|
2018-09-03 19:45:17 +00:00
|
|
|
EXPOSE 7878
|