fabaccess-bffh/Dockerfile

24 lines
747 B
Docker
Raw Normal View History

# Setup build image for multistage build
2022-03-29 19:55:09 +02:00
FROM rust:bullseye as builder
# install build deps
RUN apt-get update && apt-get upgrade -y
2022-08-17 20:56:33 +02:00
RUN apt-get install -yqq --no-install-recommends capnproto python3 python3-pip
RUN pip3 install paho-mqtt
WORKDIR /usr/src/bffh
COPY . .
2022-03-17 16:37:49 +01:00
RUN cargo build --release
# Setup deployable image
2022-12-29 01:23:12 +01:00
FROM ubuntu:22.04
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -yqq --no-install-recommends python3 python3-pip
RUN pip3 install paho-mqtt
COPY --from=copy /usr/src/bffh/bffhd.bin /usr/local/bin/bffhd
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/
EXPOSE 59661
2022-04-26 23:18:50 +02:00
ENTRYPOINT ["sh", "-c", "bffhd -c /etc/bffh/bffh.dhall --load=/etc/bffh/users.toml; bffhd -c /etc/bffh/bffh.dhall"]