Oh yikes yeah I would not be good at that pace 😅 I know you can rebuild the kernel with less features to reduce ram usage, but other than that I would be looking at what you’re already doing.
Have you considered removing docker from the equation and running directly on the host os?