mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-12-26 05:33:48 +01:00
24 lines
747 B
Docker
24 lines
747 B
Docker
# Setup build image for multistage build
|
|
FROM rust:bullseye as builder
|
|
# install build deps
|
|
RUN apt-get update && apt-get upgrade -y
|
|
RUN apt-get install -yqq --no-install-recommends capnproto python3 python3-pip
|
|
RUN pip3 install paho-mqtt
|
|
|
|
WORKDIR /usr/src/bffh
|
|
COPY . .
|
|
RUN cargo build --release
|
|
|
|
|
|
# Setup deployable image
|
|
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
|
|
VOLUME /etc/bffh/
|
|
VOLUME /var/lib/bffh/
|
|
VOLUME /usr/local/lib/bffh/adapters/
|
|
EXPOSE 59661
|
|
ENTRYPOINT ["sh", "-c", "bffhd -c /etc/bffh/bffh.dhall --load=/etc/bffh/users.toml; bffhd -c /etc/bffh/bffh.dhall"]
|