entrypoint

This commit is contained in:
Tord-Vincent Heggland
2026-04-08 09:50:09 +02:00
parent 3fec08b203
commit b52d4a5080
3 changed files with 16 additions and 1 deletions

View File

@@ -3,3 +3,8 @@ FROM debian:bookworm-slim
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y squeezelite libasound2 alsa-utils && \ apt-get install -y squeezelite libasound2 alsa-utils && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -9,5 +9,5 @@ services:
volumes: volumes:
- /etc/asound.conf:/etc/asound.conf:ro - /etc/asound.conf:/etc/asound.conf:ro
- /var/lib/alsa:/var/lib/alsa - /var/lib/alsa:/var/lib/alsa
entrypoint: ["/usr/bin/squeezelite"]
command: ["-n", "ThinkBook DAC", "-o", "hw:1,0", "-s", "10.10.10.1", "-d", "all=info"] command: ["-n", "ThinkBook DAC", "-o", "hw:1,0", "-s", "10.10.10.1", "-d", "all=info"]
init: true

10
entrypoint.sh Normal file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
set -e
echo "Starting squeezelite..."
while true; do
/usr/bin/squeezelite "$@"
echo "squeezelite stopped. Restarting in 1s..."
sleep 1
done