Skip to content

jee-r/docker-mpd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-mpd

Docker Image Size (latest by date) GitHub Workflow Status (branch) Docker Pulls DockerHub ghcr.io

A docker image for Music Player Daemon based on Alpine Linux and without root process

What is MPD?

From musicpd.org:

Music Player Daemon (MPD) is a flexible, powerful, server-side application for playing music. Through plugins and libraries it can play a variety of sound files while being controlled by its network protocol.

How to use these images

Docker

docker run \
    --detach \
    --interactive \
    --name mpd \
    --user $(id -u):$(id -g) \
    --env TZ=Europe/Paris \
    --volume `pwd`/config:/config \
    --volume `pwd`/Music:/Music:ro \
    --volume /etc/localtime:/etc/localtime:ro \
    --publish 6600:6600 \
    --publish 6868:6868 \
    ghcr.io/jee-r/mpd:latest

Docker Compose

docker-compose can help with defining the docker run config in a repeatable way rather than ensuring you always pass the same CLI arguments.

version: '3'
services:
    mpd:
        image: j33r/mpd:latest
        container_name: mpd
        user: "${UID:-1000}:${GID:-1000}"
        restart: unless-stopped
        environment:
            - HOME=/config
            - TZ=Europe/Paris
        volumes:
            - ${PWD}/config:/config
            - ${HOME}/Music:/Music:ro
            - /etc/localtime:/etc/localtime:ro
        ports:
            - 6600:6600
            - 6868:6868

Volumes

  • /config directory containing your .conf, .db, .log, .pid, .socket, .state and sticker.sql. See Doc or/and default config file mpd.conf for more informations.
  • /Music directory containing your music (read-only). Doc

Ports

  • 6600 port that MPD listens on for connections from clients. Doc
  • 6868 httpd audio output port Doc

Environment variables

To change the timezone of the container set the TZ environment variable. The full list of available options can be found on Wikipedia.

You can also set the HOME environment variable this is usefull to get in the right directory when you attach a shell in your docker container.

Contributions

Questions

We would like to have discussions and general queries related to this repository. you can reach me on Libera irc server /query jee

Pull requests

Before submitting a pull request, ensure that you go through the following:

  • Ensure that there is no open or closed Pull Request corresponding to your submission to avoid duplication of effort.
  • Create a new branch on your forked repo based on the main branch (be sure that your fork is up to date with the upstream) and make the changes in it. Example:
    git clone https://your_fork
    git checkout -B patch-N main
  • Submit the pull request, provide informations (why/where/how) in the comments section

License

This project is under the GNU Generic Public License v3 to allow free use while ensuring it stays open.