Docker nodejs build works locally but hangs on server
I have built a node app inside docker and it builds and runs perfectly on my local machine (mint 18). But when I upload the same to Digital ocean’s Docker droplet (ubuntu 16.04) it hangs mid way while building and eventually throws an error. This occurs at exactly the same place each time.
Here is the last line & the error message I can see when building ..
npm info lifecycle firstname.lastname@example.org~preinstall: email@example.com
The command '/bin/sh -c npm install' returned a non-zero code: 137
PS:I am new to docker and only been using it a few days so this might be something very obvious.
One Solution collect form web for “Docker nodejs build works locally but hangs on server”
If you look at issue 1554, it could be a resource issue.
Either a low memory or low disk would cause such an error message.
This Digital Ocean tutorial mentions the basic Droplet has only 512MB disk space. Maybe the combined images of your Dockerfile project are too important.