Sindominio: Icecast2 test

master
siroco 4 months ago
commit bf51e94977
Signed by: siroco
GPG Key ID: 1324098302A514B0
  1. 18
      Dockerfile
  2. 37
      README.md
  3. 20
      docker-compose.yml
  4. 26
      entrypoint.sh

@ -0,0 +1,18 @@
FROM registry.sindominio.net/debian
RUN apt-get update -y && apt-get full-upgrade -y \
&& apt install -y icecast2 \
ca-certificates xmlstarlet
WORKDIR icecast2
RUN cp /etc/icecast2/icecast.xml /tmp/icecast.xml \
&& chmod 777 /tmp/icecast.xml
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/bin/sh","/entrypoint.sh"]
CMD ["/usr/bin/icecast2","-c","/icecast2/icecast.xml"]
VOLUME /icecast2

@ -0,0 +1,37 @@
# Icecast 2 - Sindominio
## Preconfigure
Create volume directory:
```
mkdir data
```
Create custom .env file
```
cp .env.sample .env
vim .env
```
Change USER, PASSWORDS, LIMITS, ...
Dont change BASEDIR
## Build
```
docker-compose build
```
## Up
```
docker-compose up -d
```
## Logs
```
tail -f data/logs/*.log
```

@ -0,0 +1,20 @@
version: "2.4"
services:
icecast:
build: .
user: "${USERGROUP}"
image: icecast2:debian
ports:
- 0.0.0.0:8080:8080
volumes:
- ./data:/icecast2
environment:
- ICE_LIMITS_CLIENTS
- ICE_LIMITS_SOURCES
- ICE_ADMIN_EMAIL
- ICE_SOURCE_PASS
- ICE_ADMIN_USER
- ICE_ADMIN_PASS
- ICE_HOSTNAME
- ICE_PORT
- ICE_BASEDIR

@ -0,0 +1,26 @@
#!/bin/sh
set -e;
mkdir -p /icecast2/logs
cd /icecast2
[ -f icecast.xml ] || cp /tmp/icecast.xml icecast.xml
xmlstarlet ed -L -u 'icecast/admin' -v $ICE_ADMIN_EMAIL icecast.xml
xmlstarlet ed -L -u 'icecast/limits/clients' -v $ICE_LIMITS_CLIENTS icecast.xml
xmlstarlet ed -L -u 'icecast/limits/sources' -v $ICE_LIMITS_SOURCES icecast.xml
xmlstarlet ed -L -u 'icecast/admin' -v $ICE_ADMIN_EMAIL icecast.xml
xmlstarlet ed -L -u 'icecast/authentication/source-password' -v $ICE_SOURCE_PASS icecast.xml
xmlstarlet ed -L -u 'icecast/authentication/admin-user' -v $ICE_ADMIN_USER icecast.xml
xmlstarlet ed -L -u 'icecast/authentication/admin-password' -v $ICE_ADMIN_PASS icecast.xml
xmlstarlet ed -L -u 'icecast/hostname' -v $ICE_HOSTNAME icecast.xml
xmlstarlet ed -L -u 'icecast/listen-socket/port' -v $ICE_PORT icecast.xml
xmlstarlet ed -L -u 'icecast/paths/basedir' -v $ICE_BASEDIR icecast.xml
xmlstarlet ed -L -u 'icecast/paths/logdir' -v $ICE_BASEDIR/logs icecast.xml
xmlstarlet ed -L -u 'icecast/paths/pidfile' -v $ICE_BASEDIR/icecast.pid icecast.xml
#/usr/bin/icecast2 -c /icecast2/icecast.xml
exec $@
Loading…
Cancel
Save