So you’re building a dockerized front-end using a framework such as Vue, Angular or React, and getting this error from an app that normally behaves like an adult outside of docker:
error Command failed with signal “SIGKILL”.
Or maybe you get a “SIGABRT” signal, “Heap out of memory” or exit code 137. It all means the same thing: The build process ran out of memory and was killed.
Thankfully this is easy to solve.
- First, check and increase Docker’s global memory limit. On Mac at least, it is very low by default. Also make sure there is enough swap space, and increase if needed.
- If that fails, try giving yarn and the node build tools more heap to work with, by adding an environment variable to your Dockerfile, such as: ENV NODE_OPTIONS=”–max_old_space_size=2048″
Hope this helps!