This repo contains files for a Docker image that runs:
- Concrète Mixer - an ambient sound file mixing audio app
- Darkice
- Icecast
The image is intended to run on a Raspberry Pi to provide a closet-based internet radio station.
A Raspberry Pi, preferably a model 3, preferably running Raspbian (though I think any Linux with systemd should be fine), definitely running Docker. An internet connection is also a must.
The Docker container makes use of the ALSA snd-aloop module. Concrete Mixer directs sends its output to device Loopback,0 while Darkice listens for the output on Loopback,1. To set up snd-aloop to load on boot, run:
sudo -i
echo snd-aloop >> /etc/modules
reboot
When the pi reboots, run aplay -l
and in the sound hardware components listed you should see:
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 8/8
...
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 8/8
...
With Docker installed on your pi, run:
docker run -d --device=/dev/snd:/dev/snd -p 8000:8000 concretemixer/cm-rpi-internet:latest
Docker will download the image from dockerhub and build and run a new container.
All going well, at the end of the process you should hear Concrète Mixer playing on http://{your Pi's ip address}:8000/concrete-mixer.mp3.
To do this:
-
Copy the contents of this file to
/etc/systemd/system/docker-concrete_mixer_internet.service
: -
Restart systemd so the new file is detected:
systemctl daemon-reload
-
Enable the service:
systemctl enable docker-concrete_mixer_internet.service
-
Reboot the pi, and the Concrète Mixer service should start automatically.
The conf/icecast2.xml
file provides a default username and password. If you ever expose your Pi to the internet you should fork this repo, and specify secure credentials in conf/icecast2.xml
and conf/darkice.cfg
.
An Concrète Mixer docker image that outputs audio thru the Pi's sound card