Closed yeralin closed 3 years ago
Thanks for the post. I don't think that is how you set a docker image to start on boot -- see the Readme at https://hub.docker.com/repository/docker/mikebrady/shairport-sync.
Right, that service is for starting the existing docker image at boot. The original command was:
docker run -d \
--restart unless-stopped \
--name shairport \
--net host \
--device /dev/snd \
mikebrady/shairport-sync -- \
-d hw:1
Thanks. That command should, in fact, cause the existing image to be launched automatically on boot. It does for me.
Right, but when I reboot my raspberry, I get Process 12 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid)
, and I have to execute systemctl restart shairport
Seems like it gets launched too early at boot, and something is not up yet for it to work properly.
But then I have After=avahi-daemon.service
Just circling back to this. You don't need to do anything at all to the host machine's systemd
service file to get Docker to start the image after boot. If you have made changes to the systemd
service file, then I'd suggest you undo them.
Hi,
System:
Linux raspberrypi 5.4.72-v7+ #1356 SMP Thu Oct 22 13:56:54 BST 2020 armv7l GNU/Linux
The docker image is running perfectly on my raspberry. Now I wanted to start it at boot, here is my systemd service file:
But after reboot, I get
Process 12 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid)
inshairport
docker logs. The only way to fix it is todocker restart shairport
.