diff --git a/Dockerfile b/Dockerfile index d702409..b064c4a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,13 +35,28 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ procps \ && rm -rf /var/lib/apt/lists/* -# Install dump1090 for ADS-B (package name varies by distribution) -RUN apt-get update && \ - (apt-get install -y --no-install-recommends dump1090-mutability || \ - apt-get install -y --no-install-recommends dump1090-fa || \ - apt-get install -y --no-install-recommends dump1090 || \ - echo "Note: dump1090 not available in repos, ADS-B features limited") && \ - rm -rf /var/lib/apt/lists/* +# Build dump1090-fa from source (packages not available in slim repos) +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + git \ + pkg-config \ + libncurses-dev \ + && cd /tmp \ + && git clone --depth 1 https://github.com/flightaware/dump1090.git \ + && cd dump1090 \ + && make \ + && cp dump1090 /usr/bin/dump1090-fa \ + && ln -s /usr/bin/dump1090-fa /usr/bin/dump1090 \ + && cd /app \ + && rm -rf /tmp/dump1090 \ + # Cleanup build tools to reduce image size + && apt-get remove -y \ + build-essential \ + git \ + pkg-config \ + libncurses-dev \ + && apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* # Copy requirements first for better caching COPY requirements.txt .