Docker with Volumio 3.x

I am working on a version based on pulseaudio in Docker but it needs some more polishing. This works because pulseaudio is build in a client server model and can separate the client from the server hardware.
Another experiment is building and running only the UI in Docker in my case for building and debugging the beta UI. But this concept too is usable for hybrid systems I think.

Could you elaborate? This is already quite easy to do if you mean just host the webUI. You just need to forward all calls to the websocket to the backend. There is even a guide over at Set up development environment for UI - Volumio Documentation that shows you how…

If you however are trying to segregate the audio playback part (mpd/tc/sc etc) from the nodejs core, then that might be quite a bit more involved, but surely doable. I explored this initially, changing the socket of the different daemons, but since it’s not centralised in the core code, it’s a lot of hacks and extremely brittle.

I mentioned two different things. First thing I mentioned that I use a docker container to build the UI from source. This make it possible to have a different build environment than my main system. I run this container with docker run -it -v /run/dbus/:/run/dbus/ -v /dev/shm:/dev/shm --device /dev/snd -p 3000:3000 to debug when connected to a running volumio player as documented,

Next thing I started is building a version which uses the ability of pulseaudio to stream audio from clients over tcp to a server running the pulseaudio daemon within a LAN. This LAN could of course be localhost too. You would have to configure the pulseaudio server host of course but MPD can be configured to use pulseaudio. Next thing would be to dockerize the pulseaudio server which does have some challenging issues. So I am looking at both possibilities but have not much time atm to experiment.

Did you take a look at my links? On github i’ve already done what you are trying to do (i might have understood incorrectly though)

We are moving in the same direction but my first target is to configure mpd in the volumio container to use pulseaudio where pulseaudio in the container is maintaining a client connection on pulseaudio server on the host. In that way you could run the container on every host with correctly configured audio hardware and pulseaudio server. (Or I might not have understand you correctly)

It’s this one, isn’t it?

That dockerfile from https://github.com/jbonjean/docker-public/tree/master/volumio comes close and will be helpful. But it still looks like that its purpose is to use the hardware from within the container. What I want is the pulseaudio client using the network connection to connect to the pulseaudio server. Anyway thank you for the link to github (I really like to build containers from source and not from hub.docker.com) jbonjean github will save me a lot of time and work.

If you don’t mind, please report back your findings especially with ALSA.
I guess that Pulseaudio host configuration will matter in both cases (via network and via unix socket) which in my opinion ruins the “container” concept, that’s the reason why i would prefer straight ALSA.
By editing Pulseaudio config on the host i was able to achieve 192Khz flac but no real DSD support (host is 20.04), still that would be in contrast with automatic deployment and environment agnostic concept since you will always have to change the host config.

Actually it can work with ALSA only. I adapted the Volumio 3 beta to send music through the network based on this documentation and some googling: Streaming desktop audio on Linux without PulseAudio or JACK. This should work for a container too.

Have you tried DSD and FLAC audio verifying that the proper HW configuration/DAC was real?
Do you mind sharing your container?

I would like to run Volumio on a RaspberryPi 3 using Balena/Docker. I tried to use the jbonjean/volumio image, but it doesn’t not work for me. I getting the following error message:

exec user process caused: exec format error

From this thread it sounds like others have made better progress, would anyone mind sharing how they got there.

For completeness, here is my compose file:

version: '2.4'
volumes:
  music: {}
  data: {}
services:
  volumio:
    image: jbonjean/volumio
    restart: always
    ports:
      - 3000:3000
    volumes:
      - music:/var/lib/mpd/music
      - data:/data
    devices:
      - /dev/snd

EDIT: Answering my own question, that image is linux/amd64. Second question then, does anyone know of a working arm image.

jbonjean/volumio docker is x86 while RPi3 is ARM that’s why you are getting that.

In the past for other reason i’ve used
sudo docker run --privileged --rm tonistiigi/binfmt --install alltonistiigi/binfmt
which allows you to run non ARM instructions on ARM devices.

A much better solution would probably be to adapt the docker image of jbonjean using RPi repo (i’m assuming there is a version of Volumio for RPi)

I noticed it was an x86 architecture. I will take a look at re-purposing. Thanks for the reply.

It’s taking some time to get my head around what’s going on. But another problem with the jbonjean build is that it’s based on Volumio2. Progress is slow :-/

Any progress so far?