Run pulseaudio in a Docker container
Go to file
2018-06-20 00:19:24 +02:00
avahi-daemon.conf build pulseaudio from sources 2018-06-20 00:12:16 +02:00
client.conf build pulseaudio from sources 2018-06-20 00:12:16 +02:00
daemon.conf build pulseaudio from sources 2018-06-20 00:12:16 +02:00
default.pa build pulseaudio from sources 2018-06-20 00:12:16 +02:00
Dockerfile build pulseaudio from sources 2018-06-20 00:12:16 +02:00
entrypoint.sh build pulseaudio from sources 2018-06-20 00:12:16 +02:00
LICENSE changed license; changed exit idle time; add security_opt seccomp parameter 2016-04-12 12:17:27 +02:00
README.md trivial 2018-06-20 00:19:24 +02:00

Pulseaudio in Docker

Build and run it

docker build -t andrey01/pulseaudio .
docker run --name pulseaudio --rm -ti --device /dev/snd andrey01/pulseaudio

Use it

PULSE_SERVER=$(docker inspect pulseaudio -f '{{.NetworkSettings.IPAddress }}'):4713 mpv film.avi

Client setup for zeroconfig auto discovery

If you want the pulseaudio to automatically discover the published sinks, make sure /etc/pulse/default.pa has the following line:

load-module module-zeroconf-discover

Then restart pulseaudio:

pulseaudio --kill

Troubleshooting

Enter the namespace of a running container

sudo nsenter -a -t $(docker inspect -f '{{ .State.Pid }}' pulseaudio)