diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..8dad183a1c8c5b8b5ecbc0a2358f6b73a166f105 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM debian + +RUN useradd -ms /bin/bash icecast2 +RUN apt update -y && apt install -y icecast2 darkice +RUN usermod -G icecast -a icecast2 diff --git a/darkice.cfg b/darkice.cfg new file mode 100644 index 0000000000000000000000000000000000000000..7542efbccde717cfe1b18a20f28eb9890b314dc0 --- /dev/null +++ b/darkice.cfg @@ -0,0 +1,23 @@ +[general] +duration = 0 +bufferSecs = 1 +reconnect = yes +realtime = yes +rtprio = 3 + +[input] +device = pulseaudio +sampleRate = 44100 +bitsPerSample = 16 +channel = 2 +paSourceName = alsa_input.pci-0000_00_1f.3.analog-stereo + +[icecast2-0] +bitrateMode = vbr +format = mp3 +quality = 0.8 +server = localhost +port = 8000 +password = <pwd> +mountPoint = sonos +name = sonos diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..d8fd225a011e347392cfba65d93830259a5155ad --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: "3.9" +services: + icecast2: + build: . + command: icecast2 -c /etc/icecast2/icecast.xml + user: icecast2 + darkice: + build: . + depends_on: + - icecast2 + command: darkice + user: icecast2 + volumes: + - ./darkice.cfg:/etc/darkice.cfg:z + - /run/user/1000/pulse:/run/user/1000/pulse + diff --git a/icecast.xml b/icecast.xml new file mode 100644 index 0000000000000000000000000000000000000000..a2ff0940145c5a6a0e98f5cc1826b61568e29ebd --- /dev/null +++ b/icecast.xml @@ -0,0 +1,5 @@ +<limits> + <burst-on-connect>0</burst-on-connect> + <burst-size>0</burst-size> +</limits> +