Docker images for Roon [Please Note: Using Dockers and VMs isn't supported by Roon]

Other than assigning the VLAN as the default on the switch port, I created the MacVLAN for docker using the following command line:

sudo docker network create -d macvlan -o parent=eth5 --subnet=192.168.50.0/24 --gateway=192.168.50.1 --ip-range=192.168.50.16/28 mv_audio

As you can see I opted for a range of addresses to allow Roon extensions running in other dockers to also have an address in the same range. I also ensure that this range of address is not used by the DHCP on my router to assign to other devices. From what I understand, it should also be possible to achieve this with a docker container but I stuck with the command line.

In then referred to the network in the docker compose and manually assigned an ip address to the container:

version: "3.3"
services:
    roonserver:
        image: steefdebruijn/docker-roonserver:latest
        container_name: roonserver
        restart: unless-stopped
        hostname: roonserver
        volumes:
            - /volume2/docker/roonserver/app:/app
            - /volume2/docker/roonserver/backup:/backup
            - /volume2/docker/roonserver/data:/data
            - /volume1/music:/music
        networks:
            macvlan_network:
                ipv4_address: 192.168.50.16
        environment:
            - TZ=Europe/Brussels

networks:
    macvlan_network:
        name: mv_audio

Finally I defined a static route on the network to ensure that all traffic from the audio macvlan is sent out via the correct NIC.

Credit to @patrick_mccarthy for showing me this setup.