forked from wmbusmeters/wmbusmeters
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request wmbusmeters#1167 from testuser7/rtl_reset
Update docker image, add rtl_reset, rtl_sdr
- Loading branch information
Showing
2 changed files
with
104 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,39 @@ | ||
FROM asymworks/multiarch-alpine:${TARGETARCH}${TARGETVARIANT}-latest-stable AS build | ||
RUN apk add --no-cache alpine-sdk gcc linux-headers librtlsdr-dev libxml2-dev cmake libusb-dev bash | ||
RUN git clone https://github.com/wmbusmeters/wmbusmeters.git && \ | ||
FROM alpine AS build | ||
RUN apk add --no-cache alpine-sdk gcc linux-headers librtlsdr-dev libxml2-dev cmake libusb-dev bash samurai | ||
RUN git clone https://github.com/steve-m/librtlsdr.git && \ | ||
git clone https://github.com/wmbusmeters/wmbusmeters.git && \ | ||
git clone https://github.com/weetmuts/rtl-wmbus.git && \ | ||
git clone https://github.com/merbanan/rtl_433.git | ||
git clone https://github.com/merbanan/rtl_433.git && \ | ||
git clone https://github.com/ED6E0F17/rtl_reset.git | ||
WORKDIR /librtlsdr | ||
RUN cmake -B build -G Ninja \ | ||
-DCMAKE_BUILD_TYPE=MinSizeRel \ | ||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \ | ||
-DDETACH_KERNEL_DRIVER=ON \ | ||
-Wno-dev && \ | ||
cmake --build build && \ | ||
cmake --install build | ||
WORKDIR /wmbusmeters | ||
RUN make | ||
WORKDIR /rtl-wmbus | ||
RUN make release && chmod 755 build/rtl_wmbus | ||
WORKDIR /rtl_433 | ||
RUN mkdir build && cd build && cmake ../ && make | ||
RUN cmake -B build -G Ninja \ | ||
-DCMAKE_BUILD_TYPE=MinSizeRel && \ | ||
cmake --build build | ||
WORKDIR /rtl_reset | ||
RUN make | ||
|
||
FROM asymworks/multiarch-alpine:${TARGETARCH}${TARGETVARIANT}-latest-stable as scratch | ||
ENV QEMU_EXECVE=1 | ||
FROM alpine as scratch | ||
RUN apk add --no-cache mosquitto-clients libstdc++ curl libusb rtl-sdr libxml2 netcat-openbsd | ||
WORKDIR /wmbusmeters | ||
COPY --from=build /librtlsdr/build/src/librtlsdr.so.* /usr/lib/ | ||
COPY --from=build /librtlsdr/rtl-sdr.rules /usr/lib/udev/rules.d/rtl-sdr.rules | ||
COPY --from=build /librtlsdr/build/src/rtl_* /usr/bin/ | ||
COPY --from=build /wmbusmeters/build/wmbusmeters /wmbusmeters/wmbusmeters | ||
COPY --from=build /rtl-wmbus/build/rtl_wmbus /usr/bin/rtl_wmbus | ||
COPY --from=build /rtl_433/build/src/rtl_433 /usr/bin/rtl_433 | ||
COPY --from=build /rtl_reset/rtl_reset /usr/bin/rtl_reset | ||
COPY --from=build /wmbusmeters/docker/docker-entrypoint.sh /wmbusmeters/docker-entrypoint.sh | ||
VOLUME /wmbusmeters_data/ | ||
CMD ["sh", "/wmbusmeters/docker-entrypoint.sh"] |