Re: container support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

This can be achieved fairly "simply" (as long as you know what to look for).

You need to pass the pulse socket into the container and tell pulse clients inside the container its precise path.

So on Docker CLI, for a typical Pulse daemon running in userspace, it would be something like:

-v /run/user/1000/pulse:/run/user/1000/pulse

Inside the container, once you've installed Pulseaudio, you need to modify its client configuration:

/etc/pulse/client.conf

default-server = /run/user/1000/pulse/native

With this your Pulseaudio applications should be able to play sounds through the host PulseAudio server (of course, you'd need to adapt the runtime paths to your environment).

Bear in mind, there seems to be some inconsistencies in the way various Pulse utilities interface with the daemon. In this setup for example, "pacmd" won't work, whilst "pactl" works fine once the client configuration is fixed.

You could test this in a manual way first and then automate things a bit with a Dockerfile and what not.

Best regards.

On 12/12/2020 16:19, Jan Van den Audenaerde wrote:
Hi,

I have spend several days without success figuring out how I can use pulseaudio in a container setup on an embedded device.

I am running CentOs 8 on a headless device (intel-nuc) which is also running docker.
I would like to run pulseaudio server on the host (CentOs 8) and my docker containers should be able to use pulseaudio client to communicate with the pulseaudio server via pulseaudio unix socket.
Moreover it should be possible that different docker containers can access the microphone and speaker at the same time.



The main problem I am facing I have reported in following forum post: 


Any help would be much appreciated.
I also think that pulseaudio has the good requirements for use in a container setup if  I only can make it work.
Jan.



_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux