forked from codyc1515/pagermon-rtlsdr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (46 loc) · 1.61 KB
/
Dockerfile
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
51
52
53
54
55
56
57
58
59
# Use a Debian image that supports multiple architectures
FROM --platform=$TARGETPLATFORM debian:bullseye-20230109-slim
LABEL Description="Pagermon RTL-SDR client"
LABEL Vendor="blackwellj"
LABEL Version="1.0.0"
# Install dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools \
libpulse-dev libx11-dev nodejs npm git libusb-1.0-0-dev \
pkg-config ca-certificates git-core cmake build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Work in temporary directory for building
WORKDIR /tmp
# Blacklist the RTL-SDR driver
RUN mkdir -p /etc/modprobe.d
RUN echo 'blacklist dvb_usb_rtl28xxu' > /etc/modprobe.d/dvb-blacklist.conf
# Build and install rtl-sdr
RUN git clone git://git.osmocom.org/rtl-sdr.git
RUN mkdir /tmp/rtl-sdr/build
WORKDIR /tmp/rtl-sdr/build
RUN cmake ../ -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON
RUN make
RUN make install
RUN ldconfig -v
# Cleanup rtl-sdr build files
WORKDIR /tmp
RUN rm -rf /tmp/rtl-sdr
# Build and install multimon-ng
RUN git clone --depth 1 https://github.com/EliasOenal/multimon-ng.git /tmp/multimon-ng
RUN mkdir /tmp/multimon-ng/build
WORKDIR /tmp/multimon-ng/build
RUN qmake ../multimon-ng.pro PREFIX=/usr/local
RUN make
RUN make install
# Clone pagermon client
RUN git clone --depth 1 --progress https://github.com/pagermon/pagermon.git /pagermon
WORKDIR /pagermon/client
RUN npm install
# Copy configuration and script files
COPY ./client_config.json /pagermon/client/config/default.json
COPY ./run.sh /
RUN chmod +x /run.sh
# Set the entrypoint
CMD ["/run.sh"]