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
|
# Dockerfile for mpd
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM alpine:3
|
FROM alpine:3.12
|
||||||
MAINTAINER EasyPi Software Foundation
|
MAINTAINER EasyPi Software Foundation
|
||||||
|
|
||||||
RUN set -xe \
|
RUN set -xe \
|
||||||
&& apk add --no-cache mpd mpc \
|
&& apk add --no-cache mpd mpc \
|
||||||
&& setcap -r /usr/bin/mpd
|
&& setcap -r /usr/bin/mpd
|
||||||
|
|
||||||
COPY mpd.conf /etc/mpd.conf
|
|
||||||
VOLUME /var/lib/mpd
|
VOLUME /var/lib/mpd
|
||||||
|
|
||||||
EXPOSE 6600
|
EXPOSE 6600
|
||||||
|
@ -10,35 +10,40 @@ files while being controlled by its network protocol.
|
|||||||
## docker-compose.yml
|
## docker-compose.yml
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
mpd:
|
version: "3.8"
|
||||||
image: vimagick/mpd
|
|
||||||
ports:
|
services:
|
||||||
- "6600:6600"
|
|
||||||
- "8800:8800"
|
mpd:
|
||||||
volumes:
|
image: vimagick/mpd
|
||||||
- ./mpd.conf:/etc/mpd.conf
|
ports:
|
||||||
- ./music:/var/lib/mpd/music
|
- "6600:6600"
|
||||||
- ./playlists:/var/lib/mpd/playlists
|
- "8800:8800"
|
||||||
devices:
|
volumes:
|
||||||
- /dev/snd
|
- ./data/config:/root/.config
|
||||||
restart: always
|
- ./data/music:/var/lib/mpd/music
|
||||||
|
- ./data/playlists:/var/lib/mpd/playlists
|
||||||
|
devices:
|
||||||
|
- /dev/snd
|
||||||
|
restart: unless-stopped
|
||||||
```
|
```
|
||||||
|
|
||||||
## Server Setup
|
## Server Setup
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ mkdir -p ~/fig/mpd/{music,playlists}
|
$ mkdir -p ~/fig/mpd/{config,music,playlists}
|
||||||
$ cd ~/fig/mpd/
|
$ 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 |
|
$ curl -s -X POST -H 'Content-Length: 0' http://www.shoutcast.com/Home/Top |
|
||||||
jq '.[].ID' |
|
jq '.[].ID' |
|
||||||
parallel --eta -k curl -s 'http://yp.shoutcast.com/sbin/tunein-station.m3u?id={}' |
|
parallel --eta -k curl -s 'http://yp.shoutcast.com/sbin/tunein-station.m3u?id={}' |
|
||||||
sed '1!s@#EXTM3U@@' |
|
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
|
#EXTM3U
|
||||||
#EXTINF:-1,microphone
|
#EXTINF:-1,microphone
|
||||||
alsa://plughw:1,0
|
alsa://plughw:1,0
|
||||||
|
@ -2,14 +2,13 @@
|
|||||||
# Dockerfile for mpd-arm
|
# Dockerfile for mpd-arm
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM arm32v7/alpine:3
|
FROM arm32v7/alpine:3.12
|
||||||
MAINTAINER EasyPi Software Foundation
|
MAINTAINER EasyPi Software Foundation
|
||||||
|
|
||||||
RUN set -xe \
|
RUN set -xe \
|
||||||
&& apk add --no-cache mpd mpc \
|
&& apk add --no-cache mpd mpc \
|
||||||
&& setcap -r /usr/bin/mpd
|
&& setcap -r /usr/bin/mpd
|
||||||
|
|
||||||
COPY mpd.conf /etc/mpd.conf
|
|
||||||
VOLUME /var/lib/mpd
|
VOLUME /var/lib/mpd
|
||||||
|
|
||||||
EXPOSE 6600
|
EXPOSE 6600
|
||||||
|
@ -10,7 +10,6 @@ RUN set -xe \
|
|||||||
&& apt-get install -y mpd mpc \
|
&& apt-get install -y mpd mpc \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY mpd.conf /etc/mpd.conf
|
|
||||||
VOLUME /var/lib/mpd
|
VOLUME /var/lib/mpd
|
||||||
|
|
||||||
EXPOSE 6600
|
EXPOSE 6600
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
Music Player Daemon
|
Music Player Daemon
|
||||||
===================
|
===================
|
||||||
|
|
||||||
## Enable Audio Device (ArchLinuxArm)
|
## Raspberry Pi OS
|
||||||
|
|
||||||
|
Audio is enabled by default
|
||||||
|
|
||||||
|
## ArchLinuxArm
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ echo 'snd-bcm2835' > /etc/modules-load.d/raspberrypi.conf
|
$ echo 'snd-bcm2835' > /etc/modules-load.d/raspberrypi.conf
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
version: "3.7"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
@ -8,17 +8,17 @@ services:
|
|||||||
- "6600:6600"
|
- "6600:6600"
|
||||||
- "8800:8800"
|
- "8800:8800"
|
||||||
volumes:
|
volumes:
|
||||||
- ./mpd.conf:/etc/mpd.conf
|
- ./data/config:/root/.config
|
||||||
- ./music:/var/lib/mpd/music
|
- ./data/music:/var/lib/mpd/music
|
||||||
- ./playlists:/var/lib/mpd/playlists
|
- ./data/playlists:/var/lib/mpd/playlists
|
||||||
devices:
|
devices:
|
||||||
- /dev/snd
|
- /dev/snd
|
||||||
depends_on:
|
# depends_on:
|
||||||
- icecast
|
# - icecast
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
icecast:
|
# icecast:
|
||||||
image: easypi/icecast-arm
|
# image: vimagick/icecast
|
||||||
ports:
|
# ports:
|
||||||
- "8000:8000"
|
# - "8000:8000"
|
||||||
restart: unless-stopped
|
# restart: unless-stopped
|
||||||
|
@ -20,13 +20,6 @@ audio_output {
|
|||||||
mixer_type "software"
|
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 {
|
audio_output {
|
||||||
type "httpd"
|
type "httpd"
|
||||||
name "My HTTP Stream"
|
name "My HTTP Stream"
|
||||||
@ -38,14 +31,21 @@ audio_output {
|
|||||||
tags "yes"
|
tags "yes"
|
||||||
}
|
}
|
||||||
|
|
||||||
audio_output {
|
#audio_output {
|
||||||
type "shout"
|
# type "pulse"
|
||||||
encoding "ogg"
|
# name "My Pulse Output"
|
||||||
name "My Shout Stream"
|
# server "172.17.0.1"
|
||||||
host "icecast"
|
# sink "bluez_sink.E8_07_BF_46_F4_B1"
|
||||||
port "8000"
|
#}
|
||||||
mount "/mpd.ogg"
|
|
||||||
password "hackme"
|
#audio_output {
|
||||||
bitrate "128"
|
# type "shout"
|
||||||
format "44100:16:1"
|
# 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:
|
services:
|
||||||
|
|
||||||
@ -8,17 +8,17 @@ services:
|
|||||||
- "6600:6600"
|
- "6600:6600"
|
||||||
- "8800:8800"
|
- "8800:8800"
|
||||||
volumes:
|
volumes:
|
||||||
- ./mpd.conf:/etc/mpd.conf
|
- ./data/config:/root/.config
|
||||||
- ./music:/var/lib/mpd/music
|
- ./data/music:/var/lib/mpd/music
|
||||||
- ./playlists:/var/lib/mpd/playlists
|
- ./data/playlists:/var/lib/mpd/playlists
|
||||||
devices:
|
devices:
|
||||||
- /dev/snd
|
- /dev/snd
|
||||||
depends_on:
|
# depends_on:
|
||||||
- icecast
|
# - icecast
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
icecast:
|
# icecast:
|
||||||
image: vimagick/icecast
|
# image: vimagick/icecast
|
||||||
ports:
|
# ports:
|
||||||
- "8000:8000"
|
# - "8000:8000"
|
||||||
restart: unless-stopped
|
# 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