2020-10-06 14:21:59 +02:00
|
|
|
# Setup build image for multistage build
|
2022-03-29 19:55:09 +02:00
|
|
|
FROM rust:bullseye as builder
|
2020-10-06 14:21:59 +02:00
|
|
|
# install build deps
|
|
|
|
RUN apt-get update && apt-get upgrade -y
|
2022-03-17 16:37:49 +01:00
|
|
|
RUN apt-get install -yqq --no-install-recommends capnproto
|
2020-10-06 14:21:59 +02:00
|
|
|
|
|
|
|
WORKDIR /usr/src/bffh
|
|
|
|
COPY . .
|
2022-03-17 16:37:49 +01:00
|
|
|
RUN cargo build --release
|
2020-10-06 14:21:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Setup deployable image
|
2022-03-29 19:55:09 +02:00
|
|
|
FROM debian:bullseye-slim
|
2020-10-06 14:21:59 +02:00
|
|
|
# Install runtime deps
|
2022-03-29 19:55:09 +02:00
|
|
|
#RUN apt-get update && apt-get upgrade -yqq
|
2022-03-17 16:37:49 +01:00
|
|
|
COPY --from=builder /usr/src/bffh/target/release/bffhd /usr/local/bin/bffhd
|
2020-12-19 21:23:52 +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-19 21:23:52 +01:00
|
|
|
VOLUME /etc/bffh/
|
2021-09-21 19:17:48 +02:00
|
|
|
VOLUME /var/lib/bffh/
|
|
|
|
VOLUME /usr/local/lib/bffh/adapters/
|
2020-10-06 14:21:59 +02:00
|
|
|
EXPOSE 59661
|
2022-03-17 16:37:49 +01:00
|
|
|
ENTRYPOINT ["sh", "-c", "bffhd -c /etc/bffh/bffh.dhall --load=/etc/bffh; bffhd -c /etc/bffh/bffh.dhall"]
|