From 5509157c491dc6b4409e8dad8890d00ca61cf224 Mon Sep 17 00:00:00 2001 From: kev Date: Wed, 17 Aug 2016 11:09:57 +0800 Subject: [PATCH] add mpd --- README.md | 1 + mpd/Dockerfile | 13 ++++++++++++ mpd/README.md | 43 ++++++++++++++++++++++++++++++++++++++ mpd/arm/Dockerfile | 13 ++++++++++++ mpd/arm/README.md | 10 +++++++++ mpd/arm/docker-compose.yml | 10 +++++++++ mpd/arm/mpd.conf | 30 ++++++++++++++++++++++++++ mpd/docker-compose.yml | 10 +++++++++ mpd/mpd.conf | 30 ++++++++++++++++++++++++++ 9 files changed, 160 insertions(+) create mode 100644 mpd/Dockerfile create mode 100644 mpd/README.md create mode 100644 mpd/arm/Dockerfile create mode 100644 mpd/arm/README.md create mode 100644 mpd/arm/docker-compose.yml create mode 100644 mpd/arm/mpd.conf create mode 100644 mpd/docker-compose.yml create mode 100644 mpd/mpd.conf diff --git a/README.md b/README.md index b6e47a8..0dc86ee 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,7 @@ A collection of delicious docker recipes. - [x] icecast - [x] live555 - [x] minidlna +- [x] mpd - [x] murmur - [x] plex :moneybag: - [x] red5 :+1: diff --git a/mpd/Dockerfile b/mpd/Dockerfile new file mode 100644 index 0000000..6989068 --- /dev/null +++ b/mpd/Dockerfile @@ -0,0 +1,13 @@ +# +# Dockerfile for mpd +# + +FROM alpine +MAINTAINER kev + +RUN apk add --no-cache mpd mpc +COPY mpd.conf /etc/mpd.conf +VOLUME /var/lib/mpd + +EXPOSE 6600 +CMD ["mpd", "--stdout", "--no-daemon"] diff --git a/mpd/README.md b/mpd/README.md new file mode 100644 index 0000000..e75a5b4 --- /dev/null +++ b/mpd/README.md @@ -0,0 +1,43 @@ +Music Player Daemon +=================== + +[Music Player Daemon][1] (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. + + +## docker-compose.yml + +```yaml +mpd: + image: vimagick/mpd + ports: + - "6600:6600" + volumes: + - ./music:/var/lib/mpd/music + - ./playlists:/var/lib/mpd/playlists + devices: + - /dev/snd + restart: always +``` + +## Server Setup + +```bash +$ mkdir -p music +$ wget -P music https://upload.wikimedia.org/wikipedia/commons/d/d5/Pop_Goes_the_Weasel.ogg +$ docker-compose up -d +``` + +## Client Setup + +- Android: https://play.google.com/store/apps/details?id=com.namelessdev.mpdroid +- Desktop: http://rybczak.net/ncmpcpp/ + +## Read More + +- +- +- + +[1]: https://www.musicpd.org/ diff --git a/mpd/arm/Dockerfile b/mpd/arm/Dockerfile new file mode 100644 index 0000000..ea8ea31 --- /dev/null +++ b/mpd/arm/Dockerfile @@ -0,0 +1,13 @@ +# +# Dockerfile for mpd-arm +# + +FROM easypi/alpine-arm +MAINTAINER EasyPi Software Foundation + +RUN apk add --no-cache mpd mpc +COPY mpd.conf /etc/mpd.conf +VOLUME /var/lib/mpd + +EXPOSE 6600 +CMD ["mpd", "--stdout", "--no-daemon"] diff --git a/mpd/arm/README.md b/mpd/arm/README.md new file mode 100644 index 0000000..5d5f46f --- /dev/null +++ b/mpd/arm/README.md @@ -0,0 +1,10 @@ +Music Player Daemon +=================== + +## Enable Audio Device (ArchLinuxArm) + +```bash +$ echo 'snd-bcm2835' > /etc/modules-load.d/raspberrypi.conf +$ echo 'dtparam=audio=on' >> /boot/config.txt +$ reboot +``` diff --git a/mpd/arm/docker-compose.yml b/mpd/arm/docker-compose.yml new file mode 100644 index 0000000..21355ac --- /dev/null +++ b/mpd/arm/docker-compose.yml @@ -0,0 +1,10 @@ +mpd: + image: easypi/mpd-arm + ports: + - "6600:6600" + volumes: + - ./music:/var/lib/mpd/music + - ./playlists:/var/lib/mpd/playlists + devices: + - /dev/snd + restart: always diff --git a/mpd/arm/mpd.conf b/mpd/arm/mpd.conf new file mode 100644 index 0000000..0a73495 --- /dev/null +++ b/mpd/arm/mpd.conf @@ -0,0 +1,30 @@ +music_directory "/var/lib/mpd/music" +playlist_directory "/var/lib/mpd/playlists" +db_file "/var/lib/mpd/database" +log_file "/var/log/mpd/mpd.log" +pid_file "/var/run/mpd/mpd.pid" +state_file "/var/lib/mpd/state" +sticker_file "/var/lib/mpd/sticker.sql" + +input { + plugin "curl" +} + +audio_output { + type "alsa" + name "Default Audio Device" + mixer_type "software" +} + +#audio_output { +# type "shout" +# encoding "ogg" +# name "My Shout Stream" +# host "icecast" +# port "8000" +# mount "/mpd.ogg" +# password "hackme" +# quality "5.0" +# bitrate "128" +# format "44100:16:1" +#} diff --git a/mpd/docker-compose.yml b/mpd/docker-compose.yml new file mode 100644 index 0000000..cd910f7 --- /dev/null +++ b/mpd/docker-compose.yml @@ -0,0 +1,10 @@ +mpd: + image: vimagick/mpd + ports: + - "6600:6600" + volumes: + - ./music:/var/lib/mpd/music + - ./playlists:/var/lib/mpd/playlists + devices: + - /dev/snd + restart: always diff --git a/mpd/mpd.conf b/mpd/mpd.conf new file mode 100644 index 0000000..0a73495 --- /dev/null +++ b/mpd/mpd.conf @@ -0,0 +1,30 @@ +music_directory "/var/lib/mpd/music" +playlist_directory "/var/lib/mpd/playlists" +db_file "/var/lib/mpd/database" +log_file "/var/log/mpd/mpd.log" +pid_file "/var/run/mpd/mpd.pid" +state_file "/var/lib/mpd/state" +sticker_file "/var/lib/mpd/sticker.sql" + +input { + plugin "curl" +} + +audio_output { + type "alsa" + name "Default Audio Device" + mixer_type "software" +} + +#audio_output { +# type "shout" +# encoding "ogg" +# name "My Shout Stream" +# host "icecast" +# port "8000" +# mount "/mpd.ogg" +# password "hackme" +# quality "5.0" +# bitrate "128" +# format "44100:16:1" +#}