-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
22 lines (20 loc) · 962 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM scratch as caching-downloader
ADD https://github.com/merbanan/rtl_433/archive/20.11.tar.gz /rtl_433.tar.gz
FROM alpine:3.13.2 as builder
RUN apk add --no-cache --update cmake build-base librtlsdr-dev libusb-dev bash
COPY --from=caching-downloader / /tmp
WORKDIR /build
RUN tar -zxvf /tmp/rtl_433.tar.gz --strip-components=1
RUN mkdir out && cd out && cmake .. && make -j$(nproc) && make install
RUN echo 'blacklist dvb_usb_rtl28xxu' > /etc/modprobe.d/blacklist-dvb_usb_rtl28xxu.conf
FROM alpine:3.13.2
MAINTAINER bademux
ENV RTL_OPTS=""
RUN apk add --no-cache --update libusb librtlsdr
COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /usr/local/etc /usr/local/etc
COPY --from=builder /etc/modprobe.d/blacklist-dvb_usb_rtl28xxu.conf /etc/modprobe.d/blacklist-dvb_usb_rtl28xxu.conf
COPY --from=builder /etc/udev/rules.d/rtl-sdr.rules /etc/udev/rules.d/rtl-sdr.rules
RUN adduser -D -H user -G usb
USER user
ENTRYPOINT rtl_433 $RTL_OPTS