-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
56 lines (51 loc) · 1.94 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
FROM ghcr.io/sdr-enthusiasts/docker-baseimage:soapy-full
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 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 && \
ln -s /usr/lib/satdump/ /usr/local/lib/satdump && \
# 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 /