mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-12-28 07:56:32 +01:00
add ices
This commit is contained in:
11
ices/Dockerfile
Normal file
11
ices/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Dockerfile for ices
|
||||
#
|
||||
|
||||
FROM alpine
|
||||
MAINTAINER kev <noreply@easypi.info>
|
||||
|
||||
RUN apk add --no-cache ices
|
||||
COPY data /etc/ices
|
||||
|
||||
CMD ["ices", "/etc/ices/ices.xml"]
|
||||
105
ices/README.md
Normal file
105
ices/README.md
Normal file
@@ -0,0 +1,105 @@
|
||||
ices
|
||||
====
|
||||
|
||||
[IceS][1] is a source client for the Icecast streaming server. The purpose of this
|
||||
client is to provide an audio stream to Icecast, so that one or more listeners
|
||||
can access the stream. With this layout, the source client can be situated
|
||||
remotely from the Icecast server.
|
||||
|
||||
How It Works
|
||||
------------
|
||||
|
||||
```
|
||||
+-> (LAN) -> (icecast) -+
|
||||
(in) -> (ices) -| |-> (out) -> (mpd) -> (file)
|
||||
+-> (WAN) -> (icecast) -+
|
||||
```
|
||||
|
||||
docker-compose.yml
|
||||
------------------
|
||||
|
||||
```yaml
|
||||
ices:
|
||||
image: easypi/ices-arm
|
||||
volumes:
|
||||
- ./data:/etc/ices
|
||||
devices:
|
||||
- /dev/snd
|
||||
links:
|
||||
- icecast
|
||||
restart: always
|
||||
|
||||
icecast:
|
||||
image: easypi/icecast-arm
|
||||
ports:
|
||||
- "8000:8000"
|
||||
restart: always
|
||||
```
|
||||
|
||||
ices.xml
|
||||
--------
|
||||
|
||||
```xml
|
||||
<?xml version="1.0"?>
|
||||
<ices>
|
||||
<background>0</background>
|
||||
<loglevel>4</loglevel>
|
||||
<consolelog>1</consolelog>
|
||||
<pidfile>/var/run/ices.pid</pidfile>
|
||||
<stream>
|
||||
<metadata>
|
||||
<name>Example stream name</name>
|
||||
<genre>Example genre</genre>
|
||||
<description>A short description of your stream</description>
|
||||
<url>http://easypi.info</url>
|
||||
</metadata>
|
||||
<input>
|
||||
<module>alsa</module>
|
||||
<param name="rate">44100</param>
|
||||
<param name="channels">1</param>
|
||||
<param name="device">hw:1,0</param>
|
||||
<param name="metadata">1</param>
|
||||
<param name="metadatafilename">/etc/ices/ices.txt</param>
|
||||
</input>
|
||||
<instance>
|
||||
<hostname>icecast</hostname>
|
||||
<port>8000</port>
|
||||
<password>hackme</password>
|
||||
<mount>/live.ogg</mount>
|
||||
<encode>
|
||||
<quality>0</quality>
|
||||
<samplerate>44100</samplerate>
|
||||
<channels>1</channels>
|
||||
</encode>
|
||||
</instance>
|
||||
</stream>
|
||||
</ices>
|
||||
```
|
||||
|
||||
> You can setup multiple `instances` (e.g. LAN & WAN).
|
||||
|
||||
ices.txt
|
||||
--------
|
||||
|
||||
```ini
|
||||
artist=Various Artists
|
||||
title=Untitled Song
|
||||
```
|
||||
|
||||
Running
|
||||
-------
|
||||
|
||||
```bash
|
||||
$ arecord -l
|
||||
**** List of CAPTURE Hardware Devices ****
|
||||
card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio]
|
||||
Subdevices: 0/1
|
||||
Subdevice #0: subdevice #0
|
||||
$ alsamixer -c 1
|
||||
$ docker-compose up -d
|
||||
$ streamripper http://localhost:8000/live.ogg
|
||||
$ vi data/ices.txt
|
||||
$ docker-compose kill -s SIGUSR1
|
||||
```
|
||||
|
||||
[1]: http://icecast.org/ices/
|
||||
11
ices/arm/Dockerfile
Normal file
11
ices/arm/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Dockerfile for ices-arm
|
||||
#
|
||||
|
||||
FROM easypi/alpine-arm
|
||||
MAINTAINER EasyPi Software Foundation
|
||||
|
||||
RUN apk add --no-cache ices
|
||||
COPY data /etc/ices
|
||||
|
||||
CMD ["ices", "/etc/ices/ices.xml"]
|
||||
2
ices/arm/data/ices.txt
Normal file
2
ices/arm/data/ices.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
artist=Various Artists
|
||||
title=Untitled Song
|
||||
34
ices/arm/data/ices.xml
Normal file
34
ices/arm/data/ices.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0"?>
|
||||
<ices>
|
||||
<background>0</background>
|
||||
<loglevel>4</loglevel>
|
||||
<consolelog>1</consolelog>
|
||||
<pidfile>/var/run/ices.pid</pidfile>
|
||||
<stream>
|
||||
<metadata>
|
||||
<name>Example stream name</name>
|
||||
<genre>Example genre</genre>
|
||||
<description>A short description of your stream</description>
|
||||
<url>http://easypi.info</url>
|
||||
</metadata>
|
||||
<input>
|
||||
<module>alsa</module>
|
||||
<param name="rate">44100</param>
|
||||
<param name="channels">1</param>
|
||||
<param name="device">hw:1,0</param>
|
||||
<param name="metadata">1</param>
|
||||
<param name="metadatafilename">/etc/ices/ices.txt</param>
|
||||
</input>
|
||||
<instance>
|
||||
<hostname>icecast</hostname>
|
||||
<port>8000</port>
|
||||
<password>hackme</password>
|
||||
<mount>/live.ogg</mount>
|
||||
<encode>
|
||||
<quality>0</quality>
|
||||
<samplerate>44100</samplerate>
|
||||
<channels>1</channels>
|
||||
</encode>
|
||||
</instance>
|
||||
</stream>
|
||||
</ices>
|
||||
15
ices/arm/docker-compose.yml
Normal file
15
ices/arm/docker-compose.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
ices:
|
||||
image: easypi/ices-arm
|
||||
volumes:
|
||||
- ./data:/etc/ices
|
||||
devices:
|
||||
- /dev/snd
|
||||
links:
|
||||
- icecast
|
||||
restart: always
|
||||
|
||||
icecast:
|
||||
image: easypi/icecast-arm
|
||||
ports:
|
||||
- "8000:8000"
|
||||
restart: always
|
||||
2
ices/data/ices.txt
Normal file
2
ices/data/ices.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
artist=Various Artists
|
||||
title=Untitled Song
|
||||
34
ices/data/ices.xml
Normal file
34
ices/data/ices.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0"?>
|
||||
<ices>
|
||||
<background>0</background>
|
||||
<loglevel>4</loglevel>
|
||||
<consolelog>1</consolelog>
|
||||
<pidfile>/var/run/ices.pid</pidfile>
|
||||
<stream>
|
||||
<metadata>
|
||||
<name>Example stream name</name>
|
||||
<genre>Example genre</genre>
|
||||
<description>A short description of your stream</description>
|
||||
<url>http://easypi.info</url>
|
||||
</metadata>
|
||||
<input>
|
||||
<module>alsa</module>
|
||||
<param name="rate">44100</param>
|
||||
<param name="channels">1</param>
|
||||
<param name="device">hw:1,0</param>
|
||||
<param name="metadata">1</param>
|
||||
<param name="metadatafilename">/etc/ices/ices.txt</param>
|
||||
</input>
|
||||
<instance>
|
||||
<hostname>icecast</hostname>
|
||||
<port>8000</port>
|
||||
<password>hackme</password>
|
||||
<mount>/live.ogg</mount>
|
||||
<encode>
|
||||
<quality>0</quality>
|
||||
<samplerate>44100</samplerate>
|
||||
<channels>1</channels>
|
||||
</encode>
|
||||
</instance>
|
||||
</stream>
|
||||
</ices>
|
||||
15
ices/docker-compose.yml
Normal file
15
ices/docker-compose.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
ices:
|
||||
image: vimagick/ices
|
||||
volumes:
|
||||
- ./data:/etc/ices
|
||||
devices:
|
||||
- /dev/snd
|
||||
links:
|
||||
- icecast
|
||||
restart: always
|
||||
|
||||
icecast:
|
||||
image: vimagick/icecast
|
||||
ports:
|
||||
- "8000:8000"
|
||||
restart: always
|
||||
Reference in New Issue
Block a user