I’m also wondering if it’s possible to setup a swapfile (or otherwise increase the memory limit).
I have a container that may run out of memory when compiling some larger projects during development in local mode.
I haven’t tried this yet, but it looks related: Create a swap file