The container is just to isolate and build the kernel without the system dependencies.
But, try this instead:
git clone git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack cod/mainline
cd cod/mainline
git checkout cod/mainline/v5.12.1
fakeroot debian/rules clean
dpkg-buildpackage -uc -ui -aamd64 -b -d
I partially tested the above to be sure- I did not fully install (for obvious reasons)... But I did note that the cloning process from git can take some time.