MPD (Music Player Daemon) on Raspberry Pi / ARM
Supported tags
debian
(Dockerfile) (Debian 10 Buster (Slim))alpine
(Dockerfile) (on AlpineLinux 3.13)alpine-nocap
(Dockerfile) (on AlpineLinux 3.11)
What is MPD?
Music Player Daemon (MPD) is a free and open music player server. It plays audio files, organizes playlists and maintains a music database. In order to interact with it, a client program is needed. The MPD distribution includes mpc, a simple command line client.
About these images:
- based on official Images: debian and alpine
- It always uses the latest version contained in the distributions.
- More infromation about MPD: musicpd.org and github.com/MusicPlayerDaemon/MPD
How to use this image
docker run --name mpd -p 6600:6600 -p 8000:8000 --device=/dev/snd:/dev/snd --cap-add=sys_nice -v $(pwd)/music:/var/lib/mpd/music:rw -v $(pwd)/playlists:/var/lib/mpd/playlists:rw -v $(pwd)/playlists:/var/lib/mpd/playlists:rw -v $(pwd)/data:/var/lib/mpd/data:rw -d tobi312/rpi-mpd:debian
optional (own config):
- download mpd.conf and edit
- add to docker run command:
-v $(pwd)/mpd.conf:/etc/mpd.conf
http://localhost:8000 for Stream | Host: Host/IP , Port: 6600 for MPD Client.
Example Client: MPDroid(Android), more see https://www.musicpd.org/clients/
Docker-Compose
version: '2.4'
services:
mpd:
image: tobi312/rpi-mpd:latest
#image: tobi312/rpi-mpd:alpine
#image: tobi312/rpi-mpd:alpine-nocap
container_name: mpd
ports:
- 6600:6600
- 8000:8000
volumes:
- ./music:/var/lib/mpd/music:rw
- ./playlists:/var/lib/mpd/playlists:rw
- ./data:/var/lib/mpd/data:rw
#- ./mpd.conf:/etc/mpd.conf:rw
devices:
- "/dev/snd:/dev/snd"
cap_add:
- SYS_NICE
restart: unless-stopped
Troubleshooting
If your container fails to start with Images that based on Alpine 3.13 or newer Debian/Ubuntu on ARM devices...
... with Raspbian/Debian 10 Buster (32 bit) then update libseccomp2
* to >=2.4.4 and restart the container. (Source: 1, 2, 3)
Example (wrong date):
$ docker run --rm --name testing -it alpine:3.13 date
Sun Jan 0 00:100:4174038 1900
Solution:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee -a /etc/apt/sources.list.d/buster-backports.list
sudo apt update
sudo apt install -t buster-backports libseccomp2
"Permission denied" in logs
Solution:
mkdir {music,playlists,data} && chmod 777 {music,playlists,data}