Heya ! We haven’t tested any VLAN-enabled configurations ourselves, so this is interesting !
One option that we can see here is to do it via network manager, on the host level - see https://www.balena.io/docs/reference/OS/network/2.x/ and https://developer.gnome.org/NetworkManager/stable/ref-settings.html - this would not have knowledge of the specific containers though, would be per-device/network interface instead.
There also seems that there is an option using docker-compose - https://www.reddit.com/r/docker/comments/5t9w8b/compose_reference_macvlan_networks/ . You may need to enable
privileged : true and
network_mode: "host" in addition to that.in addition to that.
We haven’t tested any of the above ourselves so really curious if you’d have time to see if any of this works - that would be super useful.
In the meantime I have flagged this with the people that work in this area internally so we can see if anything can be done on our side to better support this case.