Hmm, interesting. Your build container has a 4G RAM limit, and I’d guess you are bumping into that. The error does not sound like you are hitting into a disk space issue, which I’d regard as less likely anyway.
Does the same happen if you run it in a SSH session? If so, do you get a “child sacrificed” OS error in your dmesg?
I notice you’re on docker:17.05.0-ce-git, which is no longer current. Take a look on Docker Hub for the new tags - it’s on 18.xx now, I think - perhaps one of them have better internal memory usage? Use the latest one if you can.
Failing that, you could switch to:
A Machine executor, which is free for now, and will give you 8G of RAM
An larger Docker executor of 8G or 16G. I believe this is normally a paid option, but F/OSS projects might get a nicer deal - you can always ask
Thanks for noticing that I’d been using an old docker tag. I’ve updated it to 18.06.1 and haven’t had the issue yet.
18.06.1 is the version on my local dev machine that I was profiling the memory of. Fingers crossed that the older versions either had a memory leak or an inefficient implementation of the docker save command.
Otherwise I’ll try to catch the issue with ssh and look for clues in dmesg.