I know nothing about what a BPI R4 is.
My take : let the router be a router : don’t run container(s) on it.
If you need containers: Take a x86 box, Run an hypervisor OS (e.g. Proxmox), create a VM for your router OS (openWRT, OPNsense, etc.) and pass through your Network Interface Card(s). Then run your containers on the host OS or in a dedicated VM.
I know nothing about what a BPI R4 is. My take : let the router be a router : don’t run container(s) on it. If you need containers: Take a x86 box, Run an hypervisor OS (e.g. Proxmox), create a VM for your router OS (openWRT, OPNsense, etc.) and pass through your Network Interface Card(s). Then run your containers on the host OS or in a dedicated VM.