Update Dockerfiles

Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
Christian König
2023-02-01 14:10:06 +01:00
parent a6c66db276
commit bea0faf488
51 changed files with 56 additions and 29 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
FROM alpine:3.12 AS builder
FROM alpine:3.17 AS builder
# Classic (aka AirPlay 1) Build
@@ -49,7 +49,7 @@ WORKDIR /
##### SPS END #####
# Shairport Sync Runtime System
FROM crazymax/alpine-s6:3.12-3.1.1.2
FROM crazymax/alpine-s6:3.17-3.1.1.2
RUN apk -U add \
alsa-lib \
@@ -78,7 +78,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/classic/etc/s6-overlay/s6-rc.d /etc/s6-overlay/s6-rc.d
RUN chmod +x /etc/s6-overlay/s6-rc.d/startup/script.sh
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
# Shairport Sync to provide the D-Bus and MPRIS interfaces within the container
@@ -92,4 +92,4 @@ 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", "/usr/local/bin/shairport-sync" ]
ENTRYPOINT [ "/init" ]
@@ -0,0 +1 @@
base
@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/01-startup/script.sh
@@ -1,8 +0,0 @@
#!/command/with-contenv sh
sleep 5
while [ ! -f /var/run/dbus.pid ]; do
"dbus is not running, sleeping for 5 seconds before trying to start avahi"
sleep 5
done
echo "Starting avahi"
exec avahi-daemon --no-chroot
@@ -0,0 +1 @@
01-startup
@@ -1,4 +1,4 @@
#!/command/with-contenv sh
rm -rf /var/run/dbus.pid
rm -rf /var/run/dbus/dbus.pid
echo "Starting dbus"
exec dbus-daemon --system --nofork
@@ -0,0 +1 @@
02-dbus
@@ -0,0 +1,7 @@
#!/command/with-contenv sh
while [ ! -f /var/run/dbus/dbus.pid ]; do
echo "s6-rc: warning: dbus is not running, sleeping for 1 seconds before trying to start avahi"
sleep 1
done
echo "Starting avahi"
exec avahi-daemon --no-chroot
@@ -0,0 +1 @@
03-avahi
@@ -0,0 +1,2 @@
#!/command/execlineb -S0
/run/s6/basedir/bin/halt
@@ -0,0 +1,7 @@
#!/command/with-contenv sh
while [ ! -f /var/run/avahi-daemon/pid ]; do
echo "s6-rc: warning: avahi is not running, sleeping for 1 seconds before trying to start shairport-sync"
sleep 1
done
echo "Starting shairport-sync"
exec /usr/local/bin/shairport-sync
@@ -0,0 +1 @@
longrun
@@ -1 +0,0 @@
/etc/s6-overlay/s6-rc.d/startup/script.sh