mirror of
https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git
synced 2024-11-23 22:30:09 +00:00
Dockerfile: move where distance binary is built
This commit is contained in:
parent
342d3fcd75
commit
04a95b7c5e
1 changed files with 4 additions and 11 deletions
15
Dockerfile
15
Dockerfile
|
@ -1,13 +1,3 @@
|
||||||
FROM ghcr.io/sdr-enthusiasts/docker-baseimage:base AS build
|
|
||||||
|
|
||||||
RUN set -x && \
|
|
||||||
apt-get update -y && \
|
|
||||||
apt-get install -q -o Dpkg::Options::="--force-confnew" -y \
|
|
||||||
gcc && \
|
|
||||||
cd / && \
|
|
||||||
curl -sSL https://raw.githubusercontent.com/sdr-enthusiasts/docker-adsb-ultrafeeder/main/downloads/distance-in-meters.c -o /distance-in-meters.c && \
|
|
||||||
gcc -static distance-in-meters.c -o distance -lm -Ofast
|
|
||||||
|
|
||||||
FROM ghcr.io/sdr-enthusiasts/docker-tar1090:latest
|
FROM ghcr.io/sdr-enthusiasts/docker-tar1090:latest
|
||||||
|
|
||||||
LABEL org.opencontainers.image.source = "https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder"
|
LABEL org.opencontainers.image.source = "https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder"
|
||||||
|
@ -53,6 +43,10 @@ RUN TEMP_PACKAGES=() && \
|
||||||
ln -s /usr/local/bin/mlat-client /usr/bin/mlat-client && \
|
ln -s /usr/local/bin/mlat-client /usr/bin/mlat-client && \
|
||||||
popd && \
|
popd && \
|
||||||
rm -rf /git && \
|
rm -rf /git && \
|
||||||
|
# Compile distance binary
|
||||||
|
curl -sSL https://raw.githubusercontent.com/sdr-enthusiasts/docker-adsb-ultrafeeder/main/downloads/distance-in-meters.c -o /distance-in-meters.c && \
|
||||||
|
gcc -static /distance-in-meters.c -o /usr/local/bin/distance -lm -Ofast && \
|
||||||
|
rm -f /distance-in-meters.c && \
|
||||||
#
|
#
|
||||||
# Clean up and install POST_PACKAGES:
|
# Clean up and install POST_PACKAGES:
|
||||||
apt-get remove -q -y "${TEMP_PACKAGES[@]}" && \
|
apt-get remove -q -y "${TEMP_PACKAGES[@]}" && \
|
||||||
|
@ -68,7 +62,6 @@ RUN TEMP_PACKAGES=() && \
|
||||||
echo "alias nano=\"nano -l\"" >> /root/.bashrc
|
echo "alias nano=\"nano -l\"" >> /root/.bashrc
|
||||||
|
|
||||||
COPY rootfs/ /
|
COPY rootfs/ /
|
||||||
COPY --from=build /distance /usr/local/bin/distance
|
|
||||||
|
|
||||||
# Add Container Version
|
# Add Container Version
|
||||||
RUN set -x && \
|
RUN set -x && \
|
||||||
|
|
Loading…
Reference in a new issue