]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Allow passing arguments via environment variable
authorChristian König <ckoenig@posteo.de>
Sun, 5 Feb 2023 19:29:49 +0000 (20:29 +0100)
committerChristian König <ckoenig@posteo.de>
Sun, 5 Feb 2023 19:29:49 +0000 (20:29 +0100)
Signed-off-by: Christian König <ckoenig@posteo.de>
docker/Dockerfile
docker/README.md
docker/classic/Dockerfile
docker/classic/etc/s6-overlay/s6-rc.d/04-shairport-sync/run
docker/etc/s6-overlay/s6-rc.d/05-shairport-sync/run

index f1ea8d6604d89a727ec94c5af8c100dcbf6b10df..47e9de46ec7a0a9016dcb80b86ca4c60bc0077ae 100644 (file)
@@ -113,5 +113,3 @@ RUN addgroup -g 29 docker_audio && addgroup shairport-sync docker_audio && addgr
 
 # Remove anything we don't need.
 RUN rm -rf /lib/apk/db/*
-
-ENTRYPOINT [ "/init" ]
index 295d2170a25900432cb2c0660bb2231815eb1b77..9953cefc821f1d8fd8848993e20dcb52eef582a5 100644 (file)
@@ -31,11 +31,12 @@ $ docker run -d --restart unless-stopped --net host --device /dev/snd \
 
 ### Options
 
-Command line options will be passed to Shairport Sync. Here is an example:
+To pass command line options to Shairport Sync they need to be set with `-e ARG=`. Here is an example:
+
 ```
 $ docker run -d --restart unless-stopped --net host --device /dev/snd \
-    mikebrady/shairport-sync:latest \
-    -v --statistics -a DenSystem -d hw:0 -c PCM
+    -e ARG="-v --statistics -a DenSystem -d hw:0 -c PCM" \
+    mikebrady/shairport-sync:latest
 ```
 This will send audio to alsa hardware device `hw:0` and make use of the that device's mixer control called `PCM`. The service will be visible as `DenSystem` on the network.
 
index f6cb01c73e54254142a4599758c587b46b35385f..962ef28cb849c74208cfcafaa826e8a2d2e8c2cf 100644 (file)
@@ -91,5 +91,3 @@ RUN addgroup -g 29 docker_audio && addgroup shairport-sync docker_audio && addgr
 
 # Remove anything we don't need.
 RUN rm -rf /lib/apk/db/*
-
-ENTRYPOINT [ "/init" ]
index c533db5ea777fad9f5597987ca598be967009e8b..5642097d1d7a7bda40b46caab14d00f752c4ca56 100644 (file)
@@ -4,4 +4,4 @@ while [ ! -f /var/run/avahi-daemon/pid ]; do
   sleep 1
 done
 echo "Starting shairport-sync"
-exec /usr/local/bin/shairport-sync
+exec /usr/local/bin/shairport-sync $ARG
index c533db5ea777fad9f5597987ca598be967009e8b..5642097d1d7a7bda40b46caab14d00f752c4ca56 100644 (file)
@@ -4,4 +4,4 @@ while [ ! -f /var/run/avahi-daemon/pid ]; do
   sleep 1
 done
 echo "Starting shairport-sync"
-exec /usr/local/bin/shairport-sync
+exec /usr/local/bin/shairport-sync $ARG