I am using docker-compose to run several instances of image mikebrady:shairport-sync on an armbian host, using macvlan networking following an example configuration here. I can bring up each service one at a time and they will work. However, there seems to be a problem if I docker compose up the whole group, or more than 3-4 containers at once. The containers will get stuck in the init script. An example log from one container is:
shairport-sync_kitchen | STARTING - Sun Jan 7 04:01:34 UTC 2024
shairport-sync_kitchen | s6-rc: info: service 01-startup successfully started
shairport-sync_kitchen | s6-rc: info: service 04-nqptp: starting
shairport-sync_kitchen | s6-rc: info: service 02-dbus: starting
shairport-sync_kitchen | s6-rc: info: service 04-nqptp successfully started
shairport-sync_kitchen | Starting nqptp
shairport-sync_kitchen | Starting dbus
shairport-sync_kitchen | s6-rc: info: service syslogd-prepare successfully started
shairport-sync_kitchen | s6-rc: info: service syslogd-log: starting
shairport-sync_kitchen | s6-rc: info: service syslogd-log successfully started
shairport-sync_kitchen | s6-rc: info: service syslogd: starting
shairport-sync_kitchen | s6-rc: info: service syslogd successfully started
If I docker compose up only one container at a time, they run successfully and I find the next log messages would have been like:
shairport-sync_garage | s6-rc: info: service 02-dbus successfully started
shairport-sync_garage | s6-rc: info: service 03-avahi: starting
shairport-sync_garage | Starting avahi
shairport-sync_garage | Found user 'avahi' (UID 86) and group 'avahi' (GID 86).
shairport-sync_garage | Successfully dropped root privileges.
shairport-sync_garage | avahi-daemon 0.8 starting up.
So it seems like these containers are getting stuck bringing up dbus or avahi. How to debug this further? Is is possible to tell docker to stagger the container startups by some delay?
The full docker-compose and other files are posted here.