From d6a3ca335a8fcd835301a025991d10bd31f68366 Mon Sep 17 00:00:00 2001 From: nils Date: Sat, 29 Aug 2026 00:15:32 +0200 Subject: [PATCH] Add runtime and nqptp image targets to the ohm Dockerfile The runtime image carries only shairport-sync and its libraries and expects the node's avahi via the host D-Bus socket; nqptp runs as a sidecar sharing /dev/shm. --- docker/Dockerfile.ohm | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/docker/Dockerfile.ohm b/docker/Dockerfile.ohm index 57012c1b..babf65f7 100644 --- a/docker/Dockerfile.ohm +++ b/docker/Dockerfile.ohm @@ -60,7 +60,53 @@ RUN ../configure --sysconfdir=/etc --with-alsa \ --with-dbus-interface --with-mpris-interface \ --with-convolution --with-soxr RUN make -j"$(nproc)" +RUN make install DESTDIR=/install # Target that yields just the binary on the host filesystem via --output. FROM --platform=linux/arm64 scratch AS binary COPY --from=builder /shairport-sync/build/shairport-sync /shairport-sync + +# nqptp sidecar image for AirPlay 2 timing; shares /dev/shm with the +# shairport-sync container (see k8s/shairport-ohm.yaml). +FROM --platform=linux/arm64 debian:${DEBIAN_VERSION} AS nqptp-build +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential autoconf automake libtool git ca-certificates \ + && rm -rf /var/lib/apt/lists/* +RUN git clone --depth=1 https://github.com/mikebrady/nqptp /nqptp +WORKDIR /nqptp +RUN autoreconf -i && ./configure && make + +FROM --platform=linux/arm64 debian:${DEBIAN_VERSION}-slim AS nqptp +COPY --from=nqptp-build /nqptp/nqptp /usr/local/bin/nqptp +ENTRYPOINT ["/usr/local/bin/nqptp"] + +# Deployable runtime image. Uses the node's avahi (host D-Bus socket mounted) +# and the nqptp sidecar (shared /dev/shm); see k8s/shairport-ohm.yaml. +# +# docker buildx build --platform linux/arm64 --target runtime \ +# -t /shairport-sync-ohm:latest -f docker/Dockerfile.ohm --push . +# docker buildx build --platform linux/arm64 --target nqptp \ +# -t /nqptp:latest -f docker/Dockerfile.ohm --push . +FROM --platform=linux/arm64 debian:${DEBIAN_VERSION}-slim AS runtime +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && apt-get install -y --no-install-recommends \ + libasound2 \ + libavahi-client3 \ + libavcodec58 \ + libavformat58 \ + libavutil56 \ + libconfig9 \ + libgcrypt20 \ + libglib2.0-0 \ + libplist3 \ + libpopt0 \ + libsndfile1 \ + libsodium23 \ + libsoxr0 \ + libssl1.1 \ + libswresample3 \ + libuuid1 \ + && rm -rf /var/lib/apt/lists/* +COPY --from=builder /install/usr/local/bin/shairport-sync /usr/local/bin/shairport-sync +ENTRYPOINT ["/usr/local/bin/shairport-sync"]