]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Fix for v3 of s6 overlay and other improvements. 1422/head
authorCharles <32498151+charlesomer@users.noreply.github.com>
Mon, 31 Jan 2022 17:57:54 +0000 (17:57 +0000)
committerCharles <32498151+charlesomer@users.noreply.github.com>
Mon, 31 Jan 2022 17:57:54 +0000 (17:57 +0000)
12 files changed:
.dockerignore [new file with mode: 0644]
docker/Dockerfile
docker/etc/s6-overlay/s6-rc.d/01-dbus/run [moved from docker/etc/services.d/01-dbus/run with 50% similarity]
docker/etc/s6-overlay/s6-rc.d/01-dbus/type [new file with mode: 0644]
docker/etc/s6-overlay/s6-rc.d/02-avahi/run [moved from docker/etc/services.d/02-avahi/run with 63% similarity]
docker/etc/s6-overlay/s6-rc.d/02-avahi/type [new file with mode: 0644]
docker/etc/s6-overlay/s6-rc.d/03-nqptp/run [new file with mode: 0644]
docker/etc/s6-overlay/s6-rc.d/03-nqptp/type [new file with mode: 0644]
docker/etc/s6-overlay/s6-rc.d/user/contents.d/01-dbus [new file with mode: 0644]
docker/etc/s6-overlay/s6-rc.d/user/contents.d/02-avahi [new file with mode: 0644]
docker/etc/s6-overlay/s6-rc.d/user/contents.d/03-nqptp [new file with mode: 0644]
docker/etc/services.d/03-nqptp/run [deleted file]

diff --git a/.dockerignore b/.dockerignore
new file mode 100644 (file)
index 0000000..98c4e3e
--- /dev/null
@@ -0,0 +1,2 @@
+.github
+documents
\ No newline at end of file
index 08e5e49bfe45743b01b2e87233134070003543ce..2a465a38b219ccdb43e1a16eef15e775136ecb27 100644 (file)
@@ -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
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 7bb0350ecdfe166b5c8261a17102961fd50179ac..096e093aa189975dc6bc884e79121210303baa70 100644 (file)
@@ -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 (file)
index 0000000..1780f9f
--- /dev/null
@@ -0,0 +1 @@
+longrun
\ No newline at end of file
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 27cd49c041793c81d0f8f9c4c74ae97606b212a3..e1cdd1c8473579c73df710bf835fe75ae62403d4 100644 (file)
@@ -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 (file)
index 0000000..1780f9f
--- /dev/null
@@ -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 (file)
index 0000000..8b07c68
--- /dev/null
@@ -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 (file)
index 0000000..1780f9f
--- /dev/null
@@ -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 (file)
index 0000000..e69de29
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 (file)
index 0000000..e69de29
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 (file)
index 0000000..e69de29
diff --git a/docker/etc/services.d/03-nqptp/run b/docker/etc/services.d/03-nqptp/run
deleted file mode 100644 (file)
index 0e3e3e4..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/execlineb -P
-/usr/local/bin/nqptp -v
\ No newline at end of file