Docker MPD Lite
Base on my Alpine MPD Lite with UID/GID + audio GID handling.
Minimal Compilation
Only following MPD build options are enabled in Dockerfile:
|
|
All other options are explicitly set to false or disabled.
Libraries
Only use following libraries in container.
Library | Usage |
---|---|
alsa-lib | Linux ALSA sound system. This is for sound output. |
ffmpeg-libs | This take care of 99% of audio file playback. |
sqlite-libs | For mpd song database. |
ffmpeg-libs does pull in other decoders.
Build
|
|
Usage
Host Directories and Volume Mapping
Host | Inside Container | Mapping Required | Usage |
---|---|---|---|
${MPD_PATH_CONF} | /mpd.conf | Optional | MPD configuration file |
${MPD_PATH_MPD} | /mpd/.mpd | Yes | Contain playlists folder, state file, database file |
${MPD_PATH_MUSIC} | /mpd/music | Yes | MPD audio file folder |
${MPD_PORT} | 6000/tcp | Yes | MPD listening port |
${MPD_SND} | Yes | MPD output device |
Create playlists director inside ${MPD_PATH_MPD} if not exist yet.
|
|
MPD_UID / MPD_GID
ENV VAR | Usage |
---|---|
MPD_UID | UID of ${MPD_PATH_MPD},${MPD_PATH_MUSIC} owner |
MPD_GID | GID of ${MPD_PATH_MPD},${MPD_PATH_MUSIC} owner |
Run
|
|
Example:
If ${MPD_PATH_MPD} and ${MPD_PATH_MUSIC} owner’s UID=1001 and GID=1002:
|
|
If using /etc/asound.conf
:
|
|
Debug / Custom Config
Get config from image:
|
|
Change mpd.conf log_level to verbose:
log_level "verbose"
Run with mpd.conf mapping:
|
|
Compose
Get docker-compose template from image:
|
|
Fill in .env
according to your environment.
|
|
Repository
Contributors
Change Log
- 0.21.14
- Matching mpd version number
- Base image: alpine:edge
- mpd version: 0.21.14
- 0.21.19
- Matching mpd version number
- Base image: alpine:edge
- mpd version: 0.21.19
- 0.21.23
- mpd version: 0.21.23
- 0.21.24
- mpd version: 0.21.24
- Fix base image: alpine:edge
- start.sh
- Use exec so start.sh can exit
- Add exit code 1
- Remove delgroup/deluser ${PUSR}
- 0.21.25
- mpd version: 0.21.25
- 0.22
- mpd version: 0.22
- 0.22.3
- mpd version: 0.22.3
- 0.22.6
- mpd version: 0.22.6
- 0.23.6
- mpd version: 0.23.6
- 0.23.6-p1
- Add docker push github workflow
License
The MIT License
Copyright (c) 2022
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.