Try these steps.
when you build the container, the inside of it has a mnt directory that’s empty.
when you build the different components, it fetches the sources for each, then builds it somewhere within that mnt directory.
In my experience with that docker/podman, after running many times, it never fails on me.
You must skipped a step somewhere.
The reason I showed this to you wasn’t to make you build a bonding module. It’s to show you a way of consistently accessing/changing something using make menuconfig, then rebuilding the kernel or modules in a way that doesn’t error out or veer away to far to error out. I hope it helps.