How to build the docker container with reduced resources

Hello,
I want to test a new version of lego in traefik.
But when I build traefik by myself on my raspberry pi 4 it hangs.
Is there any way to build the container with reduced resources like 1 or 2 cores.
I need a arm64 version of the docker container with the new lego version.

You can build for arm64 on x86, look into „cross-compile“ and „target platform“.