debian
(Dockerfile)alpine
(Dockerfile) (Recommended, small image)
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.
- 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
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)/data:/var/lib/mpd/data:rw \
-d tobi312/rpi-mpd:alpine
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.
Clients:
List of MPD Clients you can find here: https://www.musicpd.org/clients/
Examples: mympd or ampd, see docker-compose.yml-File.
version: '2.4'
services:
mpd:
#image: tobi312/rpi-mpd:debian
image: tobi312/rpi-mpd:alpine
container_name: mpd
restart: unless-stopped
ports:
- 6600:6600 # MPD Client
- 8000:8000 # Stream
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"
"Permission denied" in logs
Solution:
mkdir {Music,playlists,data} && chmod 777 {Music,playlists,data}