Allow passing arguments via environment variable
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
@@ -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" ]
|
||||
|
||||
+4
-3
@@ -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.
|
||||
|
||||
|
||||
@@ -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" ]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user