Throttle rebake to keep from running out of memory?

That doesn’t look right. Which instructions are you following?

And why are you creating swap inside the container? Swap is meant to be created on the host not inside the container.