Add runtime and nqptp image targets to the ohm Dockerfile
Set variables for a Docker build (used by another workflow). / Set variables required for docker build. (push) Successful in 1s
Build and conditionally push docker image / docker-vars (push) Successful in 1s
Build and conditionally push docker image / Build and conditionally push docker image (SHAIRPORT_SYNC_BRANCH=. , ./docker/classic/Dockerfile, classic) (push) Failing after 31m49s
Build and conditionally push docker image / Build and conditionally push docker image (SHAIRPORT_SYNC_BRANCH=. NQPTP_BRANCH=${{ needs.docker-vars.outputs.nqptp_branch }} , ./docker/Dockerfile, main) (push) Failing after 31m50s

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.
This commit is contained in:
2026-08-29 00:15:32 +02:00
parent b75edeedc3
commit d6a3ca335a
+46
View File
@@ -60,7 +60,53 @@ RUN ../configure --sysconfdir=/etc --with-alsa \
--with-dbus-interface --with-mpris-interface \ --with-dbus-interface --with-mpris-interface \
--with-convolution --with-soxr --with-convolution --with-soxr
RUN make -j"$(nproc)" RUN make -j"$(nproc)"
RUN make install DESTDIR=/install
# Target that yields just the binary on the host filesystem via --output. # Target that yields just the binary on the host filesystem via --output.
FROM --platform=linux/arm64 scratch AS binary FROM --platform=linux/arm64 scratch AS binary
COPY --from=builder /shairport-sync/build/shairport-sync /shairport-sync 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 <registry>/shairport-sync-ohm:latest -f docker/Dockerfile.ohm --push .
# docker buildx build --platform linux/arm64 --target nqptp \
# -t <registry>/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"]