Updates to Dockerfile to support ka9q-radio and latest version of Debian

pull/315/head
Andrew Koenig 2025-02-22 14:28:46 -06:00
rodzic a3b81b1272
commit 47f4202a07
1 zmienionych plików z 30 dodań i 15 usunięć

Wyświetl plik

@ -1,15 +1,13 @@
FROM debian:bullseye as builder FROM debian:bookworm-slim AS builder
MAINTAINER sa2kng <knegge@gmail.com> LABEL org.opencontainers.image.authors="sa2kng <knegge@gmail.com>"
RUN apt-get -y update && apt -y upgrade && apt-get -y install --no-install-recommends \ RUN apt-get -y update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
cmake \ cmake build-essential ca-certificates git libusb-1.0-0-dev \
build-essential \ libatlas-base-dev libsoapysdr-dev soapysdr-module-all \
ca-certificates \ libairspy-dev libairspyhf-dev libavahi-client-dev libbsd-dev \
git \ libfftw3-dev libhackrf-dev libiniparser-dev libncurses5-dev \
libusb-1.0-0-dev \ libopus-dev librtlsdr-dev libusb-1.0-0-dev libusb-dev \
libatlas-base-dev \ portaudio19-dev libasound2-dev libogg-dev uuid-dev rsync && \
libsoapysdr-dev \
soapysdr-module-all &&\
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# install everything in /target and it will go in to / on destination image. symlink make it easier for builds to find files installed by this. # install everything in /target and it will go in to / on destination image. symlink make it easier for builds to find files installed by this.
@ -26,13 +24,25 @@ RUN git clone --depth 1 https://github.com/rxseger/rx_tools.git &&\
cmake -B build -DCMAKE_INSTALL_PREFIX=/target/usr -DCMAKE_BUILD_TYPE=Release &&\ cmake -B build -DCMAKE_INSTALL_PREFIX=/target/usr -DCMAKE_BUILD_TYPE=Release &&\
cmake --build build --target install cmake --build build --target install
# Compile and install pcmcat and tune from KA9Q-Radio
RUN git clone https://github.com/ka9q/ka9q-radio.git /root/ka9q-radio && \
cd /root/ka9q-radio && \
git checkout 4025a34db6e88dce87b8f67c7eb9cc339b920261 && \
make \
-f Makefile.linux \
pcmrecord tune && \
mkdir -p /target/usr/bin/ && \
cp pcmrecord /target/usr/bin/ && \
cp tune /target/usr/bin/ && \
rm -rf /root/ka9q-radio
COPY scripts/* /target/usr/bin/ COPY scripts/* /target/usr/bin/
# to support arm wheels # to support arm wheels
RUN echo '[global]\nextra-index-url=https://www.piwheels.org/simple' > /target/etc/pip.conf # RUN echo '[global]\nextra-index-url=https://www.piwheels.org/simple' > /target/etc/pip.conf
FROM debian:bullseye as prod FROM debian:bookworm-slim AS prod
RUN apt-get -y update && apt -y upgrade && apt-get -y install --no-install-recommends \ RUN apt-get -y update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
libusb-1.0-0 \ libusb-1.0-0 \
python3-venv \ python3-venv \
python3-crcmod \ python3-crcmod \
@ -44,10 +54,15 @@ RUN apt-get -y update && apt -y upgrade && apt-get -y install --no-install-recom
bc \ bc \
rtl-sdr \ rtl-sdr \
libatlas3-base \ libatlas3-base \
avahi-utils \
libnss-mdns \
libbsd0 \
soapysdr-module-all &&\ soapysdr-module-all &&\
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
RUN pip install --system --no-cache-dir --prefer-binary horusdemodlib RUN pip install --break-system-packages --no-cache-dir --prefer-binary horusdemodlib
RUN sed -i -e 's/files dns/files mdns4_minimal [NOTFOUND=return] dns/g' /etc/nsswitch.conf
COPY --from=builder /target / COPY --from=builder /target /
CMD ["bash"] CMD ["bash"]