-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (34 loc) · 1.07 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
FROM ghcr.io/sdr-enthusiasts/docker-baseimage:rtlsdr
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
COPY ./rootfs /
COPY ./bin/acars-oxide.armv7/acars-oxide /opt/acars-oxide.armv7
COPY ./bin/acars-oxide.arm64/acars-oxide /opt/acars-oxide.arm64
COPY ./bin/acars-oxide.amd64/acars-oxide /opt/acars-oxide.amd64
# hadolint ignore=DL3008,DL3003,SC1091
RUN set -x && \
KEPT_PACKAGES=() && \
TEMP_PACKAGES=() && \
KEPT_PACKAGES+=(libzmq5) && \
KEPT_PACKAGES+=(librtlsdr-dev) && \
apt-get update && \
apt-get install -y --no-install-recommends \
"${KEPT_PACKAGES[@]}" \
"${TEMP_PACKAGES[@]}"\
&& \
# ensure binaries are executable
chmod -v a+x \
/opt/acars-oxide.armv7 \
/opt/acars-oxide.arm64 \
/opt/acars-oxide.amd64 \
&& \
# remove foreign architecture binaries
/rename_current_arch_binary.sh && \
rm -fv \
/opt/acars-oxide.* \
&& \
# clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/* && \
# test
/opt/acars-oxide --version