This is the Docker image that I'm currently using to run Mopidy on a Raspberry Pi Zero with PhatDAC and a Pi 2 with an IQAudio Pi-DACZero.
It probably won't be exactly the setup you want, but feel free to create a fork for your own setup.
The Mopidy version and all extensions to be installed are defined in requirements.txt
.
I have music files in ~/music
that I mount into the container.
Build on PC
docker build --pull -t jjok/mopidy --build-arg BUILD_FROM=debian:stable-slim .
Build on Raspberry Pi
docker build --pull -t jjok/mopidy --build-arg BUILD_FROM=balenalib/raspberry-pi:latest .
docker compose up -d
View logs:
docker logs -f mopidy
Execute any Mopidy command:
docker exec mopidy mopidy <cmd>
docker exec mopidy mopidy config
docker exec mopidy mopidy deps
- Burn Raspberry PI OS to SD card (8GB+). Put SD card in Raspberry Pi.
- Install Docker CE.
- Copy files to the Pi.
.dockerignore
docker-compose.yml
Dockerfile
Makefile
mopidy.conf
requirements.txt
- Run
build
command (takes around 30 minutes on Pi Zero) - Install soundcard (see below).
- Run container
- Reboot
https://learn.pimoroni.com/tutorial/phat/raspberry-pi-phat-dac-install
Edit /boot/config.txt
.
Remove this line:
dtparam=audio=on
Add this line:
dtoverlay=hifiberry-dac
You might need to do some other stuff too. I haven't tried this manually yet.
https://github.com/iqaudio/UserDocs/blob/master/userguide.pdf
Edit /boot/config.txt
.
Remove this line:
dtparam=audio=on
Add this line:
dtoverlay=iqaudio-dacplus
mkdir ~/usb
mkdir ~/music
Add these lines to /etc/fstab
.
/dev/sda1 /home/jonathan/usb vfat defaults 0 0
/home/jonathan/usb/music /home/jonathan/music none defaults,rbind 0 0