diff options
Diffstat (limited to '')
-rw-r--r-- | fr24feed/Dockerfile | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/fr24feed/Dockerfile b/fr24feed/Dockerfile index 63eee4f..07c00d3 100644 --- a/fr24feed/Dockerfile +++ b/fr24feed/Dockerfile @@ -1,10 +1,33 @@ # Alpine is a bit too extreme (it doesn't have /etc/localtime, no support for # hostname -I, etc.). -FROM debian:stretch-slim +FROM debian:stretch-slim AS base + +# Those are weird hacks, but the alternative (using the apt repository) was +# unsuitable (no systemctl, etc.). + +FROM base as base-386 +ENV fr24feed_directory=linux_x86_binaries +ENV fr24feed_version=1.0.24-5 +ENV fr24feed_archive_suffix=i386 + +FROM base AS base-amd64 +ENV fr24feed_directory=linux_x86_64_binaries +ENV fr24feed_version=1.0.24-5 +ENV fr24feed_archive_suffix=amd64 + +FROM base AS base-arm +ENV fr24feed_directory=rpi_binaries +ENV fr24feed_version=1.0.24-7 +ENV fr24feed_archive_suffix=armhf + +ARG TARGETARCH +FROM base-$TARGETARCH LABEL maintainer="Egor Tensin <Egor.Tensin@gmail.com>" +ENV fr24feed_archive_name="fr24feed_${fr24feed_version}_${fr24feed_archive_suffix}.tgz" + # Don't prompt: ENV DEBIAN_FRONTEND=noninteractive @@ -13,19 +36,13 @@ RUN runtime_deps='ca-certificates procps' && \ apt-get update -yq && \ apt-get install -yq --no-install-recommends $runtime_deps -# Variables: -ARG FR24FEED_VERSION=1.0.24-7 -ARG FR24FEED_ARCH=armhf - -# Download fr24feed: WORKDIR /tmp -ADD ["https://repo-feed.flightradar24.com/rpi_binaries/fr24feed_${FR24FEED_VERSION}_${FR24FEED_ARCH}.tgz", "./"] -RUN tar xzf fr24feed_${FR24FEED_VERSION}_${FR24FEED_ARCH}.tgz +ADD ["https://repo-feed.flightradar24.com/$fr24feed_directory/$fr24feed_archive_name", "./"] +RUN tar xzf "$fr24feed_archive_name" -# fr24feed config: COPY ["fr24feed.ini", "/etc/"] EXPOSE 8754 -WORKDIR fr24feed_${FR24FEED_ARCH} +WORKDIR "fr24feed_${fr24feed_archive_suffix}" CMD ["./fr24feed"] |