-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.local
34 lines (31 loc) · 991 Bytes
/
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
FROM rust:1.82.0-bullseye as builder
WORKDIR /tmp/acars_oxide
# hadolint ignore=DL3008,DL3003,SC1091
RUN set -x && \
apt-get update && \
apt-get install -y --no-install-recommends libzmq3-dev librtlsdr-dev
COPY . .
RUN cargo build --release
FROM ghcr.io/sdr-enthusiasts/docker-baseimage:rtlsdr
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
COPY rootfs /
COPY --from=builder /tmp/acars_oxide/target/release/acars-oxide /opt/acars-oxide
# 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 \
&& \
# clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/*