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

  • chown docker volumes on host (possibly through docker-compose)
  • How to inspect a running Docker container
  • Best way to install java 8 using docker?
  • Upgrade docker-compose version on windows 7
  • aufs au_opts_parse:1155:docker[2010] unknown option dirperm1
  • How can I Enable Unaccent for postgres in Docker-Compose?
  • 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.

  • docker-compose not recognizing env_file file/location, and still tries to use the default .env
  • Cannot start container: [8] System error: exec format error
  • Is it possible to change the IP of docker container when it is running?
  • How to Setup Node & Docker on Windows 10 for Use with Bash on Ubuntu on Windows?
  • Neo4j Community edition - how to configure yml to run Docker image via Kitematic CL
  • Is there a way to start a sibling docker container mounting volumes from the host?
  • 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.