מישהו יכול לעזור לי לנתח למה הוספת ה-real ip של cf מונעת rebuild?

The reason for your failure has nothing to do with memory/swap.

Also, others have encountered your problem before, so please search before asking. In fact, the Related section below has already intelligently recommended some for you, for example: Failed to bootstrap (/tmp/add-cloudflare-ips)