FROM debian:bookworm-slim
WORKDIR /work
ADD . /work
RUN apt-get update && apt-get -y install build-essential debhelper
RUN make debian-package

FROM debian:bookworm-slim
COPY --from=0 tellusagent_*.deb /
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get install -y ./tellusagent_*.deb && rm ./tellusagent_*.deb
ENTRYPOINT ["/opt/TellusAgent/tellusagent"]