2020-03-03 18:40:35 +00:00
|
|
|
FROM multiarch/alpine:amd64-latest-stable AS build
|
2020-07-01 18:00:12 +00:00
|
|
|
RUN apk add --no-cache alpine-sdk gcc linux-headers ncurses-dev librtlsdr-dev cmake libusb-dev
|
2020-03-03 18:40:35 +00:00
|
|
|
RUN git clone https://github.com/weetmuts/wmbusmeters.git && \
|
2020-07-09 13:03:21 +00:00
|
|
|
git clone https://github.com/weetmuts/rtl-wmbus.git && \
|
2020-07-01 18:00:12 +00:00
|
|
|
git clone https://github.com/merbanan/rtl_433.git
|
2020-03-03 18:40:35 +00:00
|
|
|
WORKDIR /wmbusmeters
|
|
|
|
RUN make
|
|
|
|
WORKDIR /rtl-wmbus
|
|
|
|
RUN make release && chmod 755 build/rtl_wmbus
|
2020-07-01 18:00:12 +00:00
|
|
|
WORKDIR /rtl_433
|
|
|
|
RUN mkdir build && cd build && cmake ../ && make
|
2020-03-03 18:40:35 +00:00
|
|
|
|
|
|
|
FROM multiarch/alpine:amd64-latest-stable as scratch
|
|
|
|
ENV QEMU_EXECVE=1
|
2020-07-01 18:00:12 +00:00
|
|
|
RUN apk add --no-cache mosquitto-clients libstdc++ curl libusb ncurses rtl-sdr
|
2020-03-03 18:40:35 +00:00
|
|
|
WORKDIR /wmbusmeters
|
|
|
|
COPY --from=build /wmbusmeters/build/wmbusmeters /wmbusmeters/wmbusmeters
|
|
|
|
COPY --from=build /rtl-wmbus/build/rtl_wmbus /usr/bin/rtl_wmbus
|
2020-07-01 18:00:12 +00:00
|
|
|
COPY --from=build /rtl_433/build/src/rtl_433 /usr/bin/rtl_433
|
2020-03-03 18:40:35 +00:00
|
|
|
COPY docker/docker-entrypoint.sh /wmbusmeters/docker-entrypoint.sh
|
|
|
|
VOLUME /wmbusmeters_data/
|
|
|
|
CMD ["sh", "/wmbusmeters/docker-entrypoint.sh"]
|