Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-architecture, runnable Docker image #19

Merged
merged 1 commit into from
Aug 9, 2021

Conversation

dubo-dubon-duponey
Copy link
Contributor

Fix #18

Title says all.

This is a dockerfile allowing one to cross-compile goplay2 and produce a usable, runnable multi-architecture image.

The invocation command is a bit of a mouthful though that could be made simpler.

The main "limitation" right now is that it expects pulseaudio to be running on the host or in another docker image (I really did not feel like cramming in pulseaudio here).

I'm running this in docker on a RPI 3.

Signed-off-by: dubo-dubon-duponey <[email protected]>
@dubo-dubon-duponey
Copy link
Contributor Author

I also updated the README to reflect these changes.

Specifically, I removed the mention about having to change the mDNS implementation to be able to use it in a container - I don't think that's true. Brutella is just fine running inside a container - it's more a matter of using the right networking mode (mac/ip vlan or host), since the protocol needs to be able to broadcast.

@AlbanSeurat
Copy link
Member

AlbanSeurat commented Aug 9, 2021

About mdns it is specially true on Mac where docker run in a Vm.
Anyhow, there is no pulseaudio file on Mac…

I was about to remove the Docker part (see features/audio-sync branch) but I will leave yours instead.

I have trouble with pulseaudio, I might come back to alsa.

@dubo-dubon-duponey
Copy link
Contributor Author

About mdns it is specially true on Mac where docker run in a Vm.

Yeah, I can look more into the docker4mac side if this is useful - networking has always been a bit dark magic over there - but personally, I would rather focus more on providing a brew formula on mac.

I have trouble with pulseaudio, I might come back to alsa.

+1 on this. As far as I'm concerned, Pulse does not provide value to my use cases (RPI as audio receivers) and just adds a useless layer of complexity on top of alsa.

I understand why some people may want Pulse on the desktop.

Is there a world where goplay would have a concept of backends (alsa, stdout, pipe, pulse) that the user could select?

As far as Docker is concerned, using alsa is trivial. You just need to mount the appropriate device and group.
This shows a concrete example with a shairport-sync image: https://github.com/dubo-dubon-duponey/docker-airplay#run

@dubo-dubon-duponey
Copy link
Contributor Author

@AlbanSeurat I was also thinking about this: if you want to publish a multi-architecture version of your image to Docker Hub (of ghcr), let me know and I can just add a shell script / makefile (or more documentation) with the right buildctl/buildkit invocation to do so.

@AlbanSeurat
Copy link
Member

AlbanSeurat commented Aug 9, 2021

Is there a world where goplay would have a concept of backends (alsa, stdout, pipe, pulse) that the user could select?

I would rather have one backend perfectly working than allow to choose from several options. Audio-sync require timing precision and it is not simple to ensure that with one backend…

For now, pulseaudio with the go lib I am using prevent me to have good timing, I will look at that in September.

@AlbanSeurat
Copy link
Member

@AlbanSeurat I was also thinking about this: if you want to publish a multi-architecture version of your image to Docker Hub (of ghcr), let me know and I can just add a shell script / makefile (or more documentation) with the right buildctl/buildkit invocation to do so.

I am not in a phase where I focus on publishing binaries but any helps is welcomed !

@dubo-dubon-duponey
Copy link
Contributor Author

Is there a world where goplay would have a concept of backends (alsa, stdout, pipe, pulse) that the user could select?

I would rather have one backend perfectly working than allow to choose from several options. Audio-sync require timing precision and it is not simple to ensure that with one backend…

For now, pulseaudio with the go lib I am using prevent me to have good timing, I will look at that in September.

Makes perfect sense to me.
And my vote is for just alsa indeed.

@AlbanSeurat AlbanSeurat merged commit 8eb2943 into openairplay:main Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Dockerfile broken
2 participants