mirror of
https://github.com/vimagick/dockerfiles
synced 2024-06-28 09:41:20 +00:00
update mpd
This commit is contained in:
parent
6ba60fe6b2
commit
b4bc83b24c
@ -2,14 +2,13 @@
|
||||
# Dockerfile for mpd
|
||||
#
|
||||
|
||||
FROM alpine:3
|
||||
FROM alpine:3.12
|
||||
MAINTAINER EasyPi Software Foundation
|
||||
|
||||
RUN set -xe \
|
||||
&& apk add --no-cache mpd mpc \
|
||||
&& setcap -r /usr/bin/mpd
|
||||
|
||||
COPY mpd.conf /etc/mpd.conf
|
||||
VOLUME /var/lib/mpd
|
||||
|
||||
EXPOSE 6600
|
||||
|
@ -10,35 +10,40 @@ files while being controlled by its network protocol.
|
||||
## docker-compose.yml
|
||||
|
||||
```yaml
|
||||
mpd:
|
||||
image: vimagick/mpd
|
||||
ports:
|
||||
- "6600:6600"
|
||||
- "8800:8800"
|
||||
volumes:
|
||||
- ./mpd.conf:/etc/mpd.conf
|
||||
- ./music:/var/lib/mpd/music
|
||||
- ./playlists:/var/lib/mpd/playlists
|
||||
devices:
|
||||
- /dev/snd
|
||||
restart: always
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
|
||||
mpd:
|
||||
image: vimagick/mpd
|
||||
ports:
|
||||
- "6600:6600"
|
||||
- "8800:8800"
|
||||
volumes:
|
||||
- ./data/config:/root/.config
|
||||
- ./data/music:/var/lib/mpd/music
|
||||
- ./data/playlists:/var/lib/mpd/playlists
|
||||
devices:
|
||||
- /dev/snd
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
## Server Setup
|
||||
|
||||
```bash
|
||||
$ mkdir -p ~/fig/mpd/{music,playlists}
|
||||
$ mkdir -p ~/fig/mpd/{config,music,playlists}
|
||||
$ cd ~/fig/mpd/
|
||||
|
||||
$ wget https://upload.wikimedia.org/wikipedia/commons/d/d5/Pop_Goes_the_Weasel.ogg -P music
|
||||
$ wget https://upload.wikimedia.org/wikipedia/commons/d/d5/Pop_Goes_the_Weasel.ogg -O data/music/test.ogg
|
||||
|
||||
# FIXME: OUTDATED
|
||||
$ curl -s -X POST -H 'Content-Length: 0' http://www.shoutcast.com/Home/Top |
|
||||
jq '.[].ID' |
|
||||
parallel --eta -k curl -s 'http://yp.shoutcast.com/sbin/tunein-station.m3u?id={}' |
|
||||
sed '1!s@#EXTM3U@@' |
|
||||
cat -s > playlists/shoutcast.m3u
|
||||
cat -s > data/playlists/shoutcast.m3u
|
||||
|
||||
$ cat > playlists/microphone.m3u << _EOF_
|
||||
$ cat > data/playlists/microphone.m3u << _EOF_
|
||||
#EXTM3U
|
||||
#EXTINF:-1,microphone
|
||||
alsa://plughw:1,0
|
||||
|
@ -2,14 +2,13 @@
|
||||
# Dockerfile for mpd-arm
|
||||
#
|
||||
|
||||
FROM arm32v7/alpine:3
|
||||
FROM arm32v7/alpine:3.12
|
||||
MAINTAINER EasyPi Software Foundation
|
||||
|
||||
RUN set -xe \
|
||||
&& apk add --no-cache mpd mpc \
|
||||
&& setcap -r /usr/bin/mpd
|
||||
|
||||
COPY mpd.conf /etc/mpd.conf
|
||||
VOLUME /var/lib/mpd
|
||||
|
||||
EXPOSE 6600
|
||||
|
@ -10,7 +10,6 @@ RUN set -xe \
|
||||
&& apt-get install -y mpd mpc \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY mpd.conf /etc/mpd.conf
|
||||
VOLUME /var/lib/mpd
|
||||
|
||||
EXPOSE 6600
|
||||
|
@ -1,7 +1,11 @@
|
||||
Music Player Daemon
|
||||
===================
|
||||
|
||||
## Enable Audio Device (ArchLinuxArm)
|
||||
## Raspberry Pi OS
|
||||
|
||||
Audio is enabled by default
|
||||
|
||||
## ArchLinuxArm
|
||||
|
||||
```bash
|
||||
$ echo 'snd-bcm2835' > /etc/modules-load.d/raspberrypi.conf
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: "3.7"
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
|
||||
@ -8,17 +8,17 @@ services:
|
||||
- "6600:6600"
|
||||
- "8800:8800"
|
||||
volumes:
|
||||
- ./mpd.conf:/etc/mpd.conf
|
||||
- ./music:/var/lib/mpd/music
|
||||
- ./playlists:/var/lib/mpd/playlists
|
||||
- ./data/config:/root/.config
|
||||
- ./data/music:/var/lib/mpd/music
|
||||
- ./data/playlists:/var/lib/mpd/playlists
|
||||
devices:
|
||||
- /dev/snd
|
||||
depends_on:
|
||||
- icecast
|
||||
# depends_on:
|
||||
# - icecast
|
||||
restart: unless-stopped
|
||||
|
||||
icecast:
|
||||
image: easypi/icecast-arm
|
||||
ports:
|
||||
- "8000:8000"
|
||||
restart: unless-stopped
|
||||
# icecast:
|
||||
# image: vimagick/icecast
|
||||
# ports:
|
||||
# - "8000:8000"
|
||||
# restart: unless-stopped
|
||||
|
@ -20,13 +20,6 @@ audio_output {
|
||||
mixer_type "software"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "pulse"
|
||||
name "My Pulse Output"
|
||||
server "172.17.0.1"
|
||||
sink "bluez_sink.E8_07_BF_46_F4_B1"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "httpd"
|
||||
name "My HTTP Stream"
|
||||
@ -38,14 +31,21 @@ audio_output {
|
||||
tags "yes"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "shout"
|
||||
encoding "ogg"
|
||||
name "My Shout Stream"
|
||||
host "icecast"
|
||||
port "8000"
|
||||
mount "/mpd.ogg"
|
||||
password "hackme"
|
||||
bitrate "128"
|
||||
format "44100:16:1"
|
||||
}
|
||||
#audio_output {
|
||||
# type "pulse"
|
||||
# name "My Pulse Output"
|
||||
# server "172.17.0.1"
|
||||
# sink "bluez_sink.E8_07_BF_46_F4_B1"
|
||||
#}
|
||||
|
||||
#audio_output {
|
||||
# type "shout"
|
||||
# encoding "ogg"
|
||||
# name "My Shout Stream"
|
||||
# host "icecast"
|
||||
# port "8000"
|
||||
# mount "/mpd.ogg"
|
||||
# password "hackme"
|
||||
# bitrate "128"
|
||||
# format "44100:16:1"
|
||||
#}
|
BIN
mpd/data/music/test.ogg
Normal file
BIN
mpd/data/music/test.ogg
Normal file
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
version: "3.7"
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
|
||||
@ -8,17 +8,17 @@ services:
|
||||
- "6600:6600"
|
||||
- "8800:8800"
|
||||
volumes:
|
||||
- ./mpd.conf:/etc/mpd.conf
|
||||
- ./music:/var/lib/mpd/music
|
||||
- ./playlists:/var/lib/mpd/playlists
|
||||
- ./data/config:/root/.config
|
||||
- ./data/music:/var/lib/mpd/music
|
||||
- ./data/playlists:/var/lib/mpd/playlists
|
||||
devices:
|
||||
- /dev/snd
|
||||
depends_on:
|
||||
- icecast
|
||||
# depends_on:
|
||||
# - icecast
|
||||
restart: unless-stopped
|
||||
|
||||
icecast:
|
||||
image: vimagick/icecast
|
||||
ports:
|
||||
- "8000:8000"
|
||||
restart: unless-stopped
|
||||
# icecast:
|
||||
# image: vimagick/icecast
|
||||
# ports:
|
||||
# - "8000:8000"
|
||||
# restart: unless-stopped
|
||||
|
51
mpd/mpd.conf
51
mpd/mpd.conf
@ -1,51 +0,0 @@
|
||||
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.pid"
|
||||
state_file "/var/lib/mpd/state"
|
||||
sticker_file "/var/lib/mpd/sticker.sql"
|
||||
|
||||
input {
|
||||
plugin "alsa"
|
||||
}
|
||||
|
||||
input {
|
||||
plugin "curl"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "alsa"
|
||||
name "My ALSA Device"
|
||||
mixer_type "software"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "pulse"
|
||||
name "My Pulse Output"
|
||||
server "172.17.0.1"
|
||||
sink "bluez_sink.E8_07_BF_46_F4_B1"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "httpd"
|
||||
name "My HTTP Stream"
|
||||
encoder "vorbis"
|
||||
port "8800"
|
||||
bitrate "128"
|
||||
format "44100:16:1"
|
||||
always_on "yes"
|
||||
tags "yes"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "shout"
|
||||
encoding "ogg"
|
||||
name "My Shout Stream"
|
||||
host "icecast"
|
||||
port "8000"
|
||||
mount "/mpd.ogg"
|
||||
password "hackme"
|
||||
bitrate "128"
|
||||
format "44100:16:1"
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user