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 ..

  • Docker-Compose Persistent Data Trouble
  • run “docker run” from crontab
  • Docker needs to be installed each time I restart the VM in Oracle VirtualBox
  • Docker swarm version upgrade without causing downtime
  • Install MongoDB and Tomcat using Dockerfile
  • AWS Multicontainer Docker using PHP and NGinx to install Laravel
  • npm info lifecycle app@0.0.1~preinstall: app@0.0.1
    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.

  • docker registry v2 upload fails for some images
  • How to connect to Oracle Docker image
  • Amazon Beanstalk - nginx configuration
  • How to setup multiple docker containers for multiple developers on the same host?
  • Docker compose no response
  • Error while cleaning images from docker
  • 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.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.