-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (42 loc) · 1.62 KB
/
Dockerfile
File metadata and controls
49 lines (42 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM debian:bookworm-slim AS builder
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libusb-1.0-0-dev \
libncurses-dev \
build-essential \
cmake \
git \
pkg-config \
ca-certificates \
wget && \
git clone --depth=1 https://github.com/rtlsdrblog/rtl-sdr-blog /tmp/rtl && \
cmake -S /tmp/rtl -B /tmp/rtl/build -DINSTALL_UDEV_RULES=ON && \
cmake --build /tmp/rtl/build --target install -j"$(nproc)" && \
ldconfig && \
rm -rf /tmp/rtl
# --- Final slim image ---
FROM debian:bookworm-slim
RUN apt-get update && \
apt-get purge ^librtlsdr && \
rm -rvf /usr/lib/librtlsdr* /usr/include/rtl-sdr* /usr/local/lib/librtlsdr* /usr/local/include/rtl-sdr* /usr/local/include/rtl_* /usr/local/bin/rtl_* && \
apt-get install -y --no-install-recommends \
libusb-1.0-0 \
libncurses6 \
kmod \
ca-certificates \
wget \
libairspy0 && \
wget -q https://github.com/AlexandreRouma/SDRPlusPlus/releases/download/nightly/sdrpp_debian_bookworm_aarch64.deb && \
apt-get install -y ./sdrpp_debian_bookworm_aarch64.deb && \
rm sdrpp_debian_bookworm_aarch64.deb && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Copy only the installed binaries/libs from builder
COPY --from=builder /usr/local/bin/rtl_* /usr/local/bin/
COPY --from=builder /usr/local/lib/librtlsdr* /usr/local/lib/
COPY --from=builder /etc/udev/rules.d/rtl-sdr.rules /etc/udev/rules.d/
RUN ldconfig && \
echo 'blacklist dvb_usb_rtl28xxu' > /etc/modprobe.d/blacklist-dvb_usb_rtl28xxu.conf
WORKDIR /app
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]