Merge pull request #1642 from nipsufn/ci/images-with-pa
build docker with pa support - thanks!
This commit is contained in:
@@ -9,7 +9,7 @@ Shairport Sync does not support AirPlay video or photo streaming.
|
||||
|
||||
# Quick Start
|
||||
* A building guide is available [here](BUILD.md).
|
||||
* A Docker image is available on the [Docker Hub](https://hub.docker.com/r/mikebrady/shairport-sync).
|
||||
* A Docker image is available on the [Docker Hub](https://hub.docker.com/r/mikebrady/shairport-sync). Also see [docker/README.md](docker/README.md).
|
||||
* Next Steps and Advanced Topics are [here](ADVANCED%20TOPICS/README.md).
|
||||
* Runtime settings are documented [here](scripts/shairport-sync.conf).
|
||||
* Build configuration options are detailed in [CONFIGURATION FLAGS.md](CONFIGURATION%20FLAGS.md).
|
||||
|
||||
+34
-31
@@ -8,25 +8,26 @@ ARG NQPTP_BRANCH
|
||||
RUN test -n "$NQPTP_BRANCH"
|
||||
|
||||
RUN apk -U add \
|
||||
git \
|
||||
build-base \
|
||||
alsa-lib-dev \
|
||||
autoconf \
|
||||
automake \
|
||||
libtool \
|
||||
dbus \
|
||||
alsa-lib-dev \
|
||||
popt-dev \
|
||||
soxr-dev \
|
||||
avahi-dev \
|
||||
libconfig-dev \
|
||||
libsndfile-dev \
|
||||
mosquitto-dev \
|
||||
libsodium-dev \
|
||||
libgcrypt-dev \
|
||||
build-base \
|
||||
dbus \
|
||||
ffmpeg-dev \
|
||||
xxd \
|
||||
git \
|
||||
libconfig-dev \
|
||||
libgcrypt-dev \
|
||||
libplist-dev \
|
||||
libressl-dev \
|
||||
libplist-dev
|
||||
libsndfile-dev \
|
||||
libsodium-dev \
|
||||
libtool \
|
||||
mosquitto-dev \
|
||||
popt-dev \
|
||||
pulseaudio-dev \
|
||||
soxr-dev \
|
||||
xxd
|
||||
|
||||
##### ALAC #####
|
||||
RUN git clone https://github.com/mikebrady/alac
|
||||
@@ -55,8 +56,8 @@ COPY . .
|
||||
RUN git checkout "$SHAIRPORT_SYNC_BRANCH"
|
||||
WORKDIR /shairport-sync/build
|
||||
RUN autoreconf -i ../
|
||||
RUN ../configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-airplay-2 \
|
||||
--with-metadata --with-dummy --with-pipe --with-dbus-interface \
|
||||
RUN ../configure --sysconfdir=/etc --with-alsa --with-pa --with-soxr --with-avahi --with-ssl=openssl \
|
||||
--with-airplay-2 --with-metadata --with-dummy --with-pipe --with-dbus-interface \
|
||||
--with-stdout --with-mpris-interface --with-mqtt-client \
|
||||
--with-apple-alac --with-convolution
|
||||
RUN make -j $(nproc)
|
||||
@@ -69,25 +70,26 @@ FROM crazymax/alpine-s6:3.17-3.1.1.2
|
||||
|
||||
RUN apk -U add \
|
||||
alsa-lib \
|
||||
dbus \
|
||||
popt \
|
||||
glib \
|
||||
soxr \
|
||||
avahi \
|
||||
avahi-tools \
|
||||
libconfig \
|
||||
libsndfile \
|
||||
mosquitto \
|
||||
libuuid \
|
||||
dbus \
|
||||
ffmpeg \
|
||||
libsodium \
|
||||
libgcrypt \
|
||||
libressl3.6-libcrypto \
|
||||
libplist \
|
||||
mandoc \
|
||||
man-pages \
|
||||
glib \
|
||||
less \
|
||||
less-doc
|
||||
less-doc \
|
||||
libconfig \
|
||||
libgcrypt \
|
||||
libplist \
|
||||
libpulse \
|
||||
libressl3.6-libcrypto \
|
||||
libsndfile \
|
||||
libsodium \
|
||||
libuuid \
|
||||
man-pages \
|
||||
mandoc \
|
||||
mosquitto \
|
||||
popt \
|
||||
soxr
|
||||
|
||||
# Copy build files.
|
||||
COPY --from=builder /shairport-sync/build/install/usr/local/bin/shairport-sync /usr/local/bin/shairport-sync
|
||||
@@ -100,6 +102,7 @@ COPY --from=builder /shairport-sync/build/install/etc/dbus-1/system.d/shairport-
|
||||
COPY --from=builder /shairport-sync/build/install/etc/dbus-1/system.d/shairport-sync-mpris.conf /etc/dbus-1/system.d/
|
||||
|
||||
COPY ./docker/etc/s6-overlay/s6-rc.d /etc/s6-overlay/s6-rc.d
|
||||
COPY ./docker/etc/pulse /etc/pulse
|
||||
RUN chmod +x /etc/s6-overlay/s6-rc.d/01-startup/script.sh
|
||||
|
||||
# Create non-root user for running the container -- running as the user 'shairport-sync' also allows
|
||||
|
||||
@@ -40,6 +40,8 @@ $ docker run -d --restart unless-stopped --net host --device /dev/snd \
|
||||
```
|
||||
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.
|
||||
|
||||
The image is built with PulseAudio backend support. To use it, refer to [`docker-compose.yaml`](docker-compose.yaml) for required environment variables and mounts. You might need to adjust authentication on your PulseAudio server ([PA documentation](https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-native-protocol-unixtcp)) and set default backend to `pa` via either command line option `-o` or `general.output_backend` field in config file.
|
||||
|
||||
## Configuration File
|
||||
|
||||
To get access to the full range of configuration options, pass the configuration file to `/etc/shairport-sync.conf` in the container using the `-v` option or docker compose.
|
||||
|
||||
+23
-21
@@ -8,20 +8,21 @@ ARG SHAIRPORT_SYNC_BRANCH
|
||||
RUN test -n "$SHAIRPORT_SYNC_BRANCH"
|
||||
|
||||
RUN apk -U add \
|
||||
git \
|
||||
build-base \
|
||||
alsa-lib-dev \
|
||||
autoconf \
|
||||
automake \
|
||||
libtool \
|
||||
dbus \
|
||||
alsa-lib-dev \
|
||||
popt-dev \
|
||||
mbedtls-dev \
|
||||
soxr-dev \
|
||||
avahi-dev \
|
||||
build-base \
|
||||
dbus \
|
||||
git \
|
||||
libconfig-dev \
|
||||
libsndfile-dev \
|
||||
libtool \
|
||||
mbedtls-dev \
|
||||
mosquitto-dev \
|
||||
libsndfile-dev
|
||||
popt-dev \
|
||||
pulseaudio-dev \
|
||||
soxr-dev
|
||||
|
||||
##### ALAC #####
|
||||
RUN git clone https://github.com/mikebrady/alac
|
||||
@@ -39,7 +40,7 @@ COPY . .
|
||||
RUN git checkout "$SHAIRPORT_SYNC_BRANCH"
|
||||
WORKDIR /shairport-sync/build
|
||||
RUN autoreconf -i ../
|
||||
RUN ../configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=mbedtls \
|
||||
RUN ../configure --sysconfdir=/etc --with-alsa --with-pa --with-soxr --with-avahi --with-ssl=mbedtls \
|
||||
--with-metadata --with-dummy --with-pipe --with-dbus-interface \
|
||||
--with-stdout --with-mpris-interface --with-mqtt-client \
|
||||
--with-apple-alac --with-convolution
|
||||
@@ -53,20 +54,21 @@ FROM crazymax/alpine-s6:3.17-3.1.1.2
|
||||
|
||||
RUN apk -U add \
|
||||
alsa-lib \
|
||||
dbus \
|
||||
popt \
|
||||
glib \
|
||||
mbedtls \
|
||||
soxr \
|
||||
avahi \
|
||||
avahi-tools \
|
||||
libconfig \
|
||||
mosquitto \
|
||||
libsndfile-dev \
|
||||
mandoc \
|
||||
man-pages \
|
||||
dbus \
|
||||
glib \
|
||||
less \
|
||||
less-doc
|
||||
less-doc \
|
||||
libconfig \
|
||||
libsndfile-dev \
|
||||
libpulse \
|
||||
man-pages \
|
||||
mandoc \
|
||||
mbedtls \
|
||||
mosquitto \
|
||||
popt \
|
||||
soxr
|
||||
|
||||
# Copy build files.
|
||||
COPY --from=builder /shairport-sync/build/install/usr/local/bin/shairport-sync /usr/local/bin/shairport-sync
|
||||
|
||||
@@ -5,10 +5,14 @@ services:
|
||||
image: mikebrady/shairport-sync:latest
|
||||
network_mode: host
|
||||
restart: unless-stopped
|
||||
# environment:
|
||||
# PULSE_SERVER: unix:/tmp/pulseaudio.socket # Path for PulseAudio socket
|
||||
# PULSE_COOKIE: /tmp/pulseaudio.cookie # Path for PulseAudio cookie
|
||||
devices:
|
||||
- "/dev/snd"
|
||||
- "/dev/snd" # ALSA device
|
||||
# volumes:
|
||||
# - ./volumes/shairport-sync/shairport-sync.conf:/etc/shairport-sync.conf # Customised Shairport Sync configuration file.
|
||||
# - /run/user/1000/pulse/native:/tmp/pulseaudio.socket # PulseAudio socket when using that backend
|
||||
logging:
|
||||
options:
|
||||
max-size: "200k"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
default-server = unix:/tmp/pulseaudio.socket
|
||||
# Prevent a server running in the container
|
||||
autospawn = no
|
||||
daemon-binary = /bin/true
|
||||
# Prevent the use of shared memory
|
||||
enable-shm = false
|
||||
Reference in New Issue
Block a user