Replies: 10 comments
-
I suspect zeroconf in docker is going to be problematic |
Beta Was this translation helpful? Give feedback.
-
Zeroconf should work in docker, why? |
Beta Was this translation helpful? Give feedback.
-
Just based on other problems we've seen around here w/ regards to zeroconf problems, though if it works for you, great. We're not going to be giving much/any time to supporting Docker though, as there are more pressing priorities. Good luck getting it running though. |
Beta Was this translation helpful? Give feedback.
-
I will try to find a bit more proficient way of doing it, afterwards I will release it to github and update this ticket... |
Beta Was this translation helpful? Give feedback.
-
@xMordax which command do you use to launch you docker container ? |
Beta Was this translation helpful? Give feedback.
-
I managed to have it work in a container after some tinkering. zeroconf is not an issue in itself (granted you use the appropriate networking mode for your container - eg: host or mac/ip vlan - bridge of course will not work). It seems that librespot will not work if there is no ipv6 though (and I couldn't find a way to disable ipv6 in librespot) (disclaimer: I'm new to librespot, apologies if I'm mistaken or otherwise missed something on that part) So, the trick is to enable ipv6 for docker, eg: /etc/docker/daemon.json
Once done, and granted your networking is in order, librespot will properly advertise and accept input (I'm using macvlan on wired machines, and ipvlan on wifi devices - but I assume host networking would work as well if you can't be bothered to setup mac/ip vlan).
Here is a github repo with a working multi-arch image: https://github.com/dubo-dubon-duponey/docker-librespot Image can be pulled from the Hub as well: https://hub.docker.com/r/dubodubonduponey/librespot/tags I'll add detailed instructions on the networking part later on but the above should be enough to get going... Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
Seems like the requirement for ipv6 came from the mdns library being used https://github.com/plietar/rust-mdns/blob/0974ab4ff7874437e11a89037c8258362a0061f8/src/lib.rs#L109 Which is no longer true since d91bf57 landed. @xMordax updating to librespot v0.1.0 or more recent should "fix" your problem (making it unnecessary to setup ipv6 for docker) ^ again, my understanding of librespot is limited, so, take it with a grain of salt - bottom-line though, I'm now running d91bf57 WITHOUT any ipv6 monkeying, on a raspberry pi. Librespot rocks! ;-) |
Beta Was this translation helpful? Give feedback.
-
That's not really an error, but more the library warning you that it didn't find any ipv6 interface - it can be ignored. |
Beta Was this translation helpful? Give feedback.
-
Well, it still seems that librespot (before d91bf57) will not work without ipv6... so... Either way the latest does not exhibit the same behavior, and does work (with or) without ipv6, which is great! |
Beta Was this translation helpful? Give feedback.
-
I have never seen that warning ever cause an actual problem. Librespot certainly has never required ipv6 to work (at least outside of the world of docker networking). |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
Just wanted to ask if anyone already tried to run librespot in a docker container?
I came so far that I am able to see the device in spotify connect, but afterwards it disconnects and I cannot see it anymore, also in that time I cannot play any songs.
Here are the logs I can get over
docker logs
:Here is my Dockerfile:
PS: I am also new into Docker, so I know this is not best practice here. I am happy for improvement suggestions.
Beta Was this translation helpful? Give feedback.
All reactions