Files
audioserver/snapserver/Dockerfile
T
2026-05-17 00:04:52 +02:00

34 lines
1.1 KiB
Docker

FROM debian:bookworm-slim
ARG SNAPCAST_VERSION=0.35.0
ARG TARGETARCH
# Resolve Debian arch name from Docker arch
RUN case "${TARGETARCH}" in \
amd64) ARCH=amd64 ;; \
arm64) ARCH=arm64 ;; \
arm) ARCH=armhf ;; \
*) echo "Unsupported arch: ${TARGETARCH}" && exit 1 ;; \
esac \
&& apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates gettext-base \
&& curl -fLO "https://github.com/badaix/snapcast/releases/download/v${SNAPCAST_VERSION}/snapserver_${SNAPCAST_VERSION}-1_${ARCH}_bookworm.deb" \
&& apt-get install -y --no-install-recommends ./snapserver_*.deb \
&& rm -f snapserver_*.deb \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 1704 1705 1780
HEALTHCHECK --interval=15s --timeout=5s --start-period=10s \
CMD curl -fsS http://localhost:1780/jsonrpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"Server.GetStatus","id":1}' \
| grep -q '"id":1' || exit 1
CMD ["snapserver", "--config", "/tmp/snapserver.conf"]