From: Charles <32498151+charlesomer@users.noreply.github.com> Date: Mon, 31 Jan 2022 17:57:54 +0000 (+0000) Subject: Fix for v3 of s6 overlay and other improvements. X-Git-Tag: 4.1-rc1~24^2~289^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1422%2Fhead;p=thirdparty%2Fshairport-sync.git Fix for v3 of s6 overlay and other improvements. --- diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..98c4e3ee --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.github +documents \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index 08e5e49b..2a465a38 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -64,10 +64,11 @@ RUN ./configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ss --with-apple-alac --with-convolution RUN make -j RUN make install +WORKDIR / ##### SPS END ##### # Shairport Sync Runtime System -FROM crazymax/alpine-s6:3.12-edge +FROM crazymax/alpine-s6:3.12-3.0.0.2 RUN apk -U add \ alsa-lib \ @@ -93,12 +94,12 @@ COPY --from=builder /usr/local/lib/libalac.* /usr/local/lib/ COPY --from=builder /etc/dbus-1/system.d/shairport-sync-dbus.conf /etc/dbus-1/system.d/ COPY --from=builder /etc/dbus-1/system.d/shairport-sync-mpris.conf /etc/dbus-1/system.d/ -COPY ./docker/etc /etc +COPY ./docker/etc/s6-overlay/s6-rc.d /etc/s6-overlay/s6-rc.d # Create non-root user for running the container -- running as the user 'shairport-sync' also allows # Shairport Sync to provide the D-Bus and MPRIS interfaces within the container -RUN addgroup shairport-sync +RUN addgroup shairport-sync RUN adduser -D shairport-sync -G shairport-sync # Add the shairport-sync user to the pre-existing audio group, which has ID 29, for access to the ALSA stuff diff --git a/docker/etc/services.d/01-dbus/run b/docker/etc/s6-overlay/s6-rc.d/01-dbus/run similarity index 50% rename from docker/etc/services.d/01-dbus/run rename to docker/etc/s6-overlay/s6-rc.d/01-dbus/run index 7bb0350e..096e093a 100644 --- a/docker/etc/services.d/01-dbus/run +++ b/docker/etc/s6-overlay/s6-rc.d/01-dbus/run @@ -1,3 +1,3 @@ #!/bin/sh rm -rf /var/run/dbus.pid -dbus-daemon --system --nofork \ No newline at end of file +exec dbus-daemon --system --nofork \ No newline at end of file diff --git a/docker/etc/s6-overlay/s6-rc.d/01-dbus/type b/docker/etc/s6-overlay/s6-rc.d/01-dbus/type new file mode 100644 index 00000000..1780f9f4 --- /dev/null +++ b/docker/etc/s6-overlay/s6-rc.d/01-dbus/type @@ -0,0 +1 @@ +longrun \ No newline at end of file diff --git a/docker/etc/services.d/02-avahi/run b/docker/etc/s6-overlay/s6-rc.d/02-avahi/run similarity index 63% rename from docker/etc/services.d/02-avahi/run rename to docker/etc/s6-overlay/s6-rc.d/02-avahi/run index 27cd49c0..e1cdd1c8 100644 --- a/docker/etc/services.d/02-avahi/run +++ b/docker/etc/s6-overlay/s6-rc.d/02-avahi/run @@ -2,8 +2,8 @@ avahi-daemon --check if [ $? -eq 0 ]; then echo "Reloading avahi-daemon." - avahi-daemon --no-chroot --reload + exec avahi-daemon --no-chroot --reload else echo "Starting avahi-daemon." - avahi-daemon --no-chroot + exec avahi-daemon --no-chroot fi \ No newline at end of file diff --git a/docker/etc/s6-overlay/s6-rc.d/02-avahi/type b/docker/etc/s6-overlay/s6-rc.d/02-avahi/type new file mode 100644 index 00000000..1780f9f4 --- /dev/null +++ b/docker/etc/s6-overlay/s6-rc.d/02-avahi/type @@ -0,0 +1 @@ +longrun \ No newline at end of file diff --git a/docker/etc/s6-overlay/s6-rc.d/03-nqptp/run b/docker/etc/s6-overlay/s6-rc.d/03-nqptp/run new file mode 100644 index 00000000..8b07c68f --- /dev/null +++ b/docker/etc/s6-overlay/s6-rc.d/03-nqptp/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/local/bin/nqptp -v \ No newline at end of file diff --git a/docker/etc/s6-overlay/s6-rc.d/03-nqptp/type b/docker/etc/s6-overlay/s6-rc.d/03-nqptp/type new file mode 100644 index 00000000..1780f9f4 --- /dev/null +++ b/docker/etc/s6-overlay/s6-rc.d/03-nqptp/type @@ -0,0 +1 @@ +longrun \ No newline at end of file diff --git a/docker/etc/s6-overlay/s6-rc.d/user/contents.d/01-dbus b/docker/etc/s6-overlay/s6-rc.d/user/contents.d/01-dbus new file mode 100644 index 00000000..e69de29b diff --git a/docker/etc/s6-overlay/s6-rc.d/user/contents.d/02-avahi b/docker/etc/s6-overlay/s6-rc.d/user/contents.d/02-avahi new file mode 100644 index 00000000..e69de29b diff --git a/docker/etc/s6-overlay/s6-rc.d/user/contents.d/03-nqptp b/docker/etc/s6-overlay/s6-rc.d/user/contents.d/03-nqptp new file mode 100644 index 00000000..e69de29b diff --git a/docker/etc/services.d/03-nqptp/run b/docker/etc/services.d/03-nqptp/run deleted file mode 100644 index 0e3e3e4c..00000000 --- a/docker/etc/services.d/03-nqptp/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/execlineb -P -/usr/local/bin/nqptp -v \ No newline at end of file