Setting up pHAT BEAT in Docker

I’m trying to get the Pirate Radio working through Balena (formerly Resin)

I’ve tested the hardware using a regular Raspbian image, using curl | bash

In Docker, the build fails due to the following: Running as root, please log in as a regular user with sudo rights!

I’ve also tried by installing python-phatbeat via apt-get, but that doesn’t appear to do the ALSA config. /etc/asound.conf is missing and with or without the pHAT BEAT plugged in, there’s only one sound device:

$ cat /proc/asound/cards
> 0 [ALSA           ]: bcm2835_alsa - bcm2835 ALSA
>                      bcm2835 ALSA

How can I install audio support for the pHAT BEAT?

You probably just need dtoverlay=hifiberry-dac in /boot/config.txt- however that might be accomplished on Balena.

That was exactly what was needed!

Many thanks