-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.local
74 lines (66 loc) · 2.06 KB
/
Dockerfile.local
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
#build acars-bridge
FROM rust:1.83.0 as builder
WORKDIR /tmp/acars-bridge
# hadolint ignore=DL3008,DL3003,SC1091
RUN set -x && \
apt-get update && \
apt-get install -y --no-install-recommends libzmq3-dev
RUN set -x && \
git clone https://github.com/sdr-enthusiasts/acars-bridge.git . && \
cargo build --release && \
# clean up the apt-cache
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
cp /tmp/acars-bridge/target/release/acars-bridge . && \
cargo clean
FROM ghcr.io/sdr-enthusiasts/docker-baseimage:acars-decoder
ENV DEVICE_INDEX="" \
QUIET_LOGS="TRUE" \
FREQUENCIES="" \
FEED_ID="" \
PPM="0"\
GAIN="400" \
SERIAL="" \
OUTPUT_SERVER="acars_router" \
OUTPUT_SERVER_PORT="5555" \
OUTPUT_SERVER_MODE="udp" \
MODE="J"
# hadolint ignore=DL3008,SC2086,SC2039,SC3054
RUN set -x && \
TEMP_PACKAGES=() && \
KEPT_PACKAGES=() && \
# Required for building multiple packages.
TEMP_PACKAGES+=(build-essential) && \
TEMP_PACKAGES+=(pkg-config) && \
TEMP_PACKAGES+=(cmake) && \
TEMP_PACKAGES+=(git) && \
TEMP_PACKAGES+=(automake) && \
TEMP_PACKAGES+=(autoconf) && \
TEMP_PACKAGES+=(wget) && \
# install packages
apt-get update && \
apt-get install -y --no-install-recommends \
"${KEPT_PACKAGES[@]}" \
"${TEMP_PACKAGES[@]}"\
&& \
# vdlm2dec
# git clone https://github.com/TLeconte/vdlm2dec.git /src/vdlm2dec && \
git clone https://github.com/wiedehopf/vdlm2dec.git /src/vdlm2dec && \
pushd /src/vdlm2dec && \
# fix for floating point amd64 nonsense
sed -i 's/add_compile_options(-Ofast -march=native )/add_compile_options(-O2 )/g' CMakeLists.txt && \
mkdir build && \
pushd build && \
cmake ../ -Drtl=ON -DCMAKE_BUILD_TYPE=Debug && \
make && \
make install && \
popd && popd && \
# Clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/*
COPY rootfs/ /
COPY --from=builder /tmp/acars-bridge/acars-bridge /opt/acars-bridge
# ENTRYPOINT [ "/init" ]
# Add healthcheck
HEALTHCHECK --start-period=3600s --interval=600s CMD /scripts/healthcheck.sh