aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dump1090/Dockerfile
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-12-30 00:11:18 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-12-30 00:11:18 +0300
commitd3f62143256cfffbd0f175d90c16d012ba3f483a (patch)
treedfdfb34df887745be73771ef1360593ee17ea69c /dump1090/Dockerfile
parentswitch to journald logging driver (diff)
downloadfr24feed-d3f62143256cfffbd0f175d90c16d012ba3f483a.tar.gz
fr24feed-d3f62143256cfffbd0f175d90c16d012ba3f483a.zip
dump1090: slimmer image
* Use stretch-slim instead of stretch. * Remove build dependencies & the build files.
Diffstat (limited to 'dump1090/Dockerfile')
-rw-r--r--dump1090/Dockerfile33
1 files changed, 19 insertions, 14 deletions
diff --git a/dump1090/Dockerfile b/dump1090/Dockerfile
index 578f73c..7c6f4ed 100644
--- a/dump1090/Dockerfile
+++ b/dump1090/Dockerfile
@@ -1,17 +1,7 @@
-FROM debian:stretch
+FROM debian:stretch-slim
LABEL maintainer="Egor Tensin <Egor.Tensin@gmail.com>"
-# Don't prompt:
-ENV DEBIAN_FRONTEND=noninteractive
-
-RUN apt-get update -yq \
- && apt-get install -yq --no-install-recommends \
- # dump1090 dependencies (from README at https://github.com/flightaware/dump1090):
- build-essential debhelper librtlsdr-dev pkg-config dh-systemd libncurses5-dev libbladerf-dev \
- # Supervisor to run both lighttpd and dump1090:
- supervisor
-
# Build and install the dump1090-fa package:
WORKDIR /tmp
@@ -21,11 +11,26 @@ ARG DUMP1090_ARCH=armhf
ADD ["https://github.com/flightaware/dump1090/archive/v${DUMP1090_VERSION}.tar.gz", "./dump1090-${DUMP1090_VERSION}.tar.gz"]
-RUN tar xzf dump1090-${DUMP1090_VERSION}.tar.gz && \
- cd dump1090-${DUMP1090_VERSION} && \
+# Don't prompt:
+ENV DEBIAN_FRONTEND=noninteractive
+
+ # dump1090 dependencies (from README at https://github.com/flightaware/dump1090):
+RUN build_deps='build-essential debhelper librtlsdr-dev pkg-config dh-systemd libncurses5-dev libbladerf-dev' && \
+ # dump1090-fa runtime dependencies:
+ runtime_deps='librtlsdr0 libncurses5 libbladerf1' && \
+ # Supervisor to run both dump1090-fa and lighttpd:
+ supervisor='supervisor' && \
+ apt-get update -yq && \
+ apt-get install -yq --no-install-recommends $build_deps $runtime_deps $supervisor && \
+ tar xzf dump1090-${DUMP1090_VERSION}.tar.gz && \
+ cd -- dump1090-${DUMP1090_VERSION} && \
dpkg-buildpackage -b && \
dpkg-buildpackage -Tclean && \
- apt-get install -yq ../dump1090-fa_${DUMP1090_VERSION}_${DUMP1090_ARCH}.deb
+ cd -- .. && \
+ apt-get install -yq ./dump1090-fa_${DUMP1090_VERSION}_${DUMP1090_ARCH}.deb && \
+ rm -rf -- dump1090-${DUMP1090_VERSION}.tar.gz dump1090-${DUMP1090_VERSION}/ && \
+ find . -mindepth 1 -maxdepth 1 -type f -\( -name '*.buildinfo' -o -name '*.changes' -o -name '*.deb' -\) -delete && \
+ apt-get purge -yq --auto-remove -o APT::AutoRemove::RecommendsImportant=false $build_deps
# Create the /run/dump1090-fa directory, typically created by systemd:
RUN mkdir --mode=0755 /run/dump1090-fa