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

  • bash: How do I write a shell script to sftp a mongodump from a MongoDB Docker container inside a DigitalOcean droplet to backup the MongoDB database?
  • How to connect to containers on docker Overlay network from an external machine
  • Can i use watch in nodemon or pm2 in docker with file in shard drive?
  • How to start another bash in Dockerfile
  • Pillow ImageFont is different in docker/Alpine and Ubuntu
  • Docker how to map subdirectory to port
  • npm info lifecycle app@0.0.1~preinstall: app@0.0.1
    Killed
    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.

  • How to configure docker to be able to have internet access via wireless connection?
  • how jenkins in a docker access git-repo of gitlab in another docker
  • GCE persistent disk, kubernetes, and data persistence
  • Docker Shipyard - deploying a container to a specific node
  • Docker daemon restart and reattaching to containers
  • Start node app when running docker container from cli
  • 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.