Skip to content

kencx/mpd-docker-pulseaudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mpd & PulseAudio in Docker

This image runs mpd & PulseAudio in Docker. It utilizes a standard mpd config with pulseaudio output. Refer to docker-compose.yml for an example on how to run the image.

Note that the image requires SYS_NICE capabilities to run.

PulseAudio in Docker

The resultant container does not run its own PulseAudio server. Instead, mpd connects to the host's PulseAudio server and outputs sound to the host directly. This is done by exposing the host's PulseAudio socket /run/user/$(id -u)/pulse to the container and inject the environment variable PULSE_SERVER=/run/user/$(id -u)/pulse/native.

The container must be running with the same UID as the host user for mpd to connect to the socket.

Finally, we ensure that PulseAudio is not started within the container with a custom pulse-client.conf. It prevents the use of shared memory by disabling shm which is known to cause errors.

Issues

  • If container is allowed to start automatically on reboot of the host, the pulseaudio socket is deleted as it is not started before Docker.

References

About

Run mpd with pulseaudio in Docker

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published