From c75dce9922cba63e4e967ff0f904ef3764ed9642 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Sat, 26 Oct 2024 13:00:05 -0400 Subject: [PATCH 1/2] fix wrong libairspyhf version / path ais-catcher:edge changed from installing libairspyhf from package to compiling libairspyhf from source and using make install this changes the library path for libairspyhf.so.0 which fails for libairspyhf users fix that by copying the required files from ais-catcher:edge instead of installing libairspyhf --- Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 328d8f0..c984cb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,6 @@ echo "TARGETARCH $TARGETARCH" && \ #KEPT_PACKAGES+=(librtlsdr0) && \ KEPT_PACKAGES+=(libairspy0) && \ KEPT_PACKAGES+=(libhackrf0) && \ - KEPT_PACKAGES+=(libairspyhf1) && \ KEPT_PACKAGES+=(libzmq5) && \ KEPT_PACKAGES+=(libsoxr0) && \ # KEPT_PACKAGES+=(libcurl4) && \ @@ -76,10 +75,13 @@ echo "TARGETARCH $TARGETARCH" && \ apt-get autoremove -y && \ rm -rf /src/* /tmp/* /var/lib/apt/lists/* -COPY rootfs/ / - -# add AIS-catcher -COPY --from=build /usr/local/bin/AIS-catcher /usr/local/bin/AIS-catcher +# add AIS-catcher and libairspyhf +RUN \ + --mount=type=bind,from=build,source=/,target=/build/ \ + set -x && \ + cp -v /build/usr/local/bin/AIS-catcher /usr/local/bin/AIS-catcher && \ + find /build | grep libairspyhf | cut -d/ --complement -f1,2 | xargs --replace echo cp -v /build/'{}' /'{}' && \ + true # Add Container Version RUN set -x && \ @@ -92,5 +94,7 @@ pushd /tmp && \ popd && \ rm -rf /tmp/* +COPY rootfs/ / + # Add healthcheck HEALTHCHECK --start-period=60s --interval=120s --timeout=100s CMD /healthcheck/healthcheck.sh From d96a7fe6ba3c1dbd818b0896a625de4b9e83f065 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Sat, 26 Oct 2024 13:04:13 -0400 Subject: [PATCH 2/2] remove unnecessary qemu files to save space --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index c984cb0..3802f5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -73,6 +73,8 @@ echo "TARGETARCH $TARGETARCH" && \ apt-get remove -y "${TEMP_PACKAGES[@]}"; \ fi && \ apt-get autoremove -y && \ + # delete unnecessary qemu binaries to save lots of space + { find /usr/bin -regex '/usr/bin/qemu-.*-static' | grep -v qemu-arm-static | xargs rm -vf {} || true; } && \ rm -rf /src/* /tmp/* /var/lib/apt/lists/* # add AIS-catcher and libairspyhf