-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
84 lines (79 loc) · 2.81 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
FROM ghcr.io/sdr-enthusiasts/docker-baseimage:rtlsdr
ENV NO_SDRPLAY_API="true"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
COPY satdump.patch /tmp/satdump.patch
# hadolint ignore=DL3008,SC2086,DL4006,SC2039
RUN set -x && \
TEMP_PACKAGES=() && \
KEPT_PACKAGES=() && \
TEMP_PACKAGES+=() && \
# temp
TEMP_PACKAGES+=(build-essential) && \
TEMP_PACKAGES+=(cmake) && \
TEMP_PACKAGES+=(pkg-config) && \
TEMP_PACKAGES+=(git) && \
TEMP_PACKAGES+=(libtiff-dev) && \
TEMP_PACKAGES+=(libjemalloc-dev) && \
TEMP_PACKAGES+=(libusb-1.0-0-dev) && \
# keep
KEPT_PACKAGES+=(libusb-1.0-0) && \
KEPT_PACKAGES+=(libtiff6) && \
KEPT_PACKAGES+=(python3) && \
KEPT_PACKAGES+=(python3-prctl) && \
apt-get update && \
apt-get install -y --no-install-recommends \
"${KEPT_PACKAGES[@]}" \
"${TEMP_PACKAGES[@]}" && \
# deploy libmiri
git clone https://github.com/ericek111/libmirisdr-5.git /src/libmirisdr-5 && \
pushd /src/libmirisdr-5 && \
mkdir build && \
pushd build && \
cmake .. && \
make && \
make install && \
popd && popd && \
# build libairspy
git clone https://github.com/airspy/airspyhf.git /src/airspyhf && \
pushd /src/airspyhf && \
mkdir -p /src/airspyhf/build && \
pushd /src/airspyhf/build && \
cmake ../ -DCMAKE_BUILD_TYPE=Release -DINSTALL_UDEV_RULES=ON && \
make && \
make install && \
ldconfig && \
popd && popd && \
# deploy airspyone host
git clone https://github.com/airspy/airspyone_host.git /src/airspyone_host && \
pushd /src/airspyone_host && \
mkdir -p /src/airspyone_host/build && \
pushd /src/airspyone_host/build && \
cmake ../ -DINSTALL_UDEV_RULES=ON && \
make && \
make install && \
ldconfig && \
popd && popd && \
# deploy satdump
git clone https://github.com/altillimity/satdump.git /src/satdump && \
pushd /src/satdump && \
git apply /tmp/satdump.patch && \
sed -i '/zenity/d' packages.runner && \
xargs -a /src/satdump/packages.builder apt install --no-install-recommends -qy && \
xargs -a /src/satdump/packages.runner apt install -qy && \
mkdir build && \
pushd build && \
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=OFF .. && \
make -j`nproc` && \
make install && \
popd && popd && \
xargs -a /src/satdump/packages.builder apt purge -qy && \
# Clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/* && \
mkdir -p /opt && \
pushd /opt && \
curl --location --output /opt/citycodes.csv https://raw.githubusercontent.com/rpatel3001/Airports/main/citycodes.csv && \
curl --location --output /opt/airports.csv https://raw.githubusercontent.com/rpatel3001/Airports/main/airports.csv && \
popd
COPY rootfs /