-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.ogn-rf
50 lines (39 loc) · 1.53 KB
/
Dockerfile.ogn-rf
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
50
# Create the builder image
FROM debian:bookworm AS builder
WORKDIR /build
# Install the tools we need for rtl-sdr to compile
RUN apt update && \
apt install -y git cmake pkg-config debhelper dpkg-dev libusb-1.0-0-dev libconfig-dev
# Generate rtl-sdr package with modifications for "silver dongle" v3 and v4
RUN git clone https://github.com/rtlsdrblog/rtl-sdr-blog --branch master --depth 1 --single-branch && \
cd rtl-sdr-blog && \
dpkg-buildpackage -b --no-sign && \
cd .. && \
dpkg -i librtlsdr0_*.deb && \
dpkg -i librtlsdr-dev_*.deb && \
dpkg -i rtl-sdr_*.deb
# Install the tools we additionally need for ogn-rf to compile
RUN apt install -y g++ libfftw3-dev libjpeg-dev libpng-dev
# Compile ogn-rf
RUN git clone https://github.com/pjalocha/ogn-rf-soapysdr --branch master --depth 1 --single-branch && \
cd ogn-rf-soapysdr && \
make ogn-rf || true && \
cd ..
# Create the final slim image
FROM debian:bookworm-slim
WORKDIR /rtlsdr-ogn
# Install libraries that rtl-sdr and ogn-rf need to run
RUN apt update && \
apt install -y libusb-1.0-0 libjpeg62 libconfig9 libfftw3-bin libpng16-16 && \
rm -rf /var/lib/apt/lists/*
# Install the modified rtl-sdr library from above
COPY --from=builder /build/librtlsdr0_*.deb .
COPY --from=builder /build/rtl-sdr_*.deb .
RUN dpkg -i librtlsdr0_*.deb && \
dpkg -i rtl-sdr_*.deb && \
rm *.deb
# Copy the ogn-rf binary from above
COPY --from=builder /build/ogn-rf-soapysdr/ogn-rf .
ENTRYPOINT ["./ogn-rf"]
VOLUME /rtlsdr-ogn/rtlsdr-ogn.conf
EXPOSE 8080 50010