-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile.soapy-full
112 lines (110 loc) · 3.41 KB
/
Dockerfile.soapy-full
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
FROM ghcr.io/sdr-enthusiasts/docker-baseimage:soapyrtlsdr
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3008,SC2086,DL4006,SC2039
RUN set -x && \
TEMP_PACKAGES=() && \
KEPT_PACKAGES=() && \
# packages needed to install
TEMP_PACKAGES+=(git) && \
# packages needed to build
TEMP_PACKAGES+=(build-essential) && \
TEMP_PACKAGES+=(cmake) && \
TEMP_PACKAGES+=(pkg-config) && \
TEMP_PACKAGES+=(libusb-1.0-0-dev) && \
# dependencies for SoapySDR
# install packages
apt-get update && \
apt-get install -y --no-install-recommends \
"${KEPT_PACKAGES[@]}" \
"${TEMP_PACKAGES[@]}" \
&& \
if ! uname -m | grep -qs armv7; then \
# install sdrplay
curl --location --output /tmp/install_sdrplay.sh https://raw.githubusercontent.com/sdr-enthusiasts/install-libsdrplay/main/install_sdrplay.sh && \
chmod +x /tmp/install_sdrplay.sh && \
/tmp/install_sdrplay.sh && \
# Deploy SoapyRTLTCP
git clone https://github.com/pothosware/SoapyRTLTCP.git /src/SoapyRTLTCP && \
pushd /src/SoapyRTLTCP && \
mkdir -p /src/SoapyRTLTCP/build && \
pushd /src/SoapyRTLTCP/build && \
cmake ../ -DCMAKE_BUILD_TYPE=Release && \
make all && \
make install && \
popd && popd && \
ldconfig && \
# deploy SoapySDRPlay
git clone https://github.com/pothosware/SoapySDRPlay.git /src/SoapySDRPlay && \
pushd /src/SoapySDRPlay && \
mkdir build && \
pushd build && \
cmake .. && \
make && \
make install && \
popd && \
popd && \
ldconfig; \
fi && \
# deploy libmirisdr
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 && \
# deploy SoapyMiri
git clone https://github.com/ericek111/SoapyMiri.git /src/SoapyMiri && \
pushd /src/SoapyMiri && \
mkdir build && \
pushd build && \
cmake .. && \
make -j4 && \
make install && \
popd && popd && \
# deploy airspyhf
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 SoapyAirspyHF
git clone https://github.com/pothosware/SoapyAirspyHF.git /src/SoapyAirspyHF && \
pushd /src/SoapyAirspyHF && \
mkdir -p /src/SoapyAirspyHF/build && \
pushd /src/SoapyAirspyHF/build && \
cmake ../ -DCMAKE_BUILD_TYPE=Release && \
make all && \
make install && \
popd && popd && \
ldconfig && \
# 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 SoapyAirspy
git clone https://github.com/pothosware/SoapyAirspy.git /src/SoapyAirspy && \
pushd /src/SoapyAirspy && \
mkdir build && \
pushd build && \
cmake .. && \
make && \
make install && \
popd && \
popd && \
# Clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
rm -rf /src/* && \
bash /scripts/clean-build.sh