One common cause is memory exhaustion in the container - check what you have memory sized to for your compilation (or other) tasks vs what the container memory size is. When Linux (assuming this is Linux) hits the container memory limit it will start killing processes (entries for that may be in /var/log/messages, depending on Linux distro), but seeing those after the container is done can be challenging.