I’ve got a Dockerfile that uses node and installs and compiles several modules with NPM.
The problem is it takes a very long time (at least 10 minutes) on my raspberry pi 3b+ and the cli loses connection while it’s happening, and the image never gets built.
I can use balena cloud to build the image but that takes a good 4 minutes between finishing writing code and seeing it running. The live code push in local mode is a really nice experience that I’d like to work.
The reason the image build fails is because systemd kills the balena engine before it completes.
There’s a related issue here https://github.com/balena-os/balena-engine/issues/196
In the journalctl logs you can see:
balena.service: Watchdog timeout (limit 6min)
From some investigation I can see that (i think) systemctl is killing it because the health check that healthdog is supplying it isn’t happening (I guess /usr/lib/balena/balena-healthcheck is very very slow or the engine isn’t replying?)
systemctl show balena.service:
I thought I’d change the systemd settings for the balena service and increase the timeout. It’s defined in
/etc/systemd/system/balena.service.d/balena.conf but that file’s mounted as read only, which is fair enough … but I can’t figure out how to edit it because I don’t know where it actually exists. I thought what’s in /etc would either be from
/mnt/state/root-overlay/etc/ but it’s not in either place.