2020-10-06 14:21:59 +02:00
|
|
|
# Setup build image for multistage build
|
|
|
|
FROM rust:latest as builder
|
|
|
|
# install build deps
|
|
|
|
RUN apt-get update && apt-get upgrade -y
|
|
|
|
RUN apt-get install -yqq --no-install-recommends capnproto build-essential cmake clang libclang-dev libgsasl7-dev
|
|
|
|
|
|
|
|
WORKDIR /usr/src/bffh
|
|
|
|
COPY . .
|
|
|
|
RUN cargo install --path .
|
|
|
|
|
|
|
|
|
|
|
|
# Setup deployable image
|
|
|
|
FROM debian:buster-slim
|
|
|
|
# Install runtime deps
|
|
|
|
RUN apt-get update && apt-get upgrade -yqq
|
|
|
|
RUN apt-get install -yqq libgsasl7 && rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=builder /usr/local/cargo/bin/diflouroborane /usr/local/bin/diflouroborane
|
2020-12-16 14:38:40 +01:00
|
|
|
COPY --from=builder /usr/src/bffh/examples/bffh.dhall /etc/diflouroborane.dhall
|
2020-10-06 14:21:59 +02:00
|
|
|
# RUN diflouroborane --print-default > /etc/diflouroborane.toml
|
2020-12-16 14:38:40 +01:00
|
|
|
VOLUME /etc/diflouroborane.dhall
|
2020-10-06 14:21:59 +02:00
|
|
|
EXPOSE 59661
|
2020-12-16 14:38:40 +01:00
|
|
|
ENTRYPOINT ["diflouroborane"]
|