Getting error installing nodejs when building from docker

I am trying to install nodejs using the docker console for ubuntu but I get an error installing node js. This is the error I am getting

The command [/bin/sh -c ./configure && make && make install] returned a non-zero code: 127

This is part of my dockerfile

  • Docker cloud not find images after location changed
  • Understanding overlay networks in docker
  • Docker HTTPS access - ONLYOFFICE3
  • Docker PHP Sessions Not Persisting
  • ARG substitution in RUN command not working for Dockerfile
  • save docker output to a text file
  • FROM ubuntu:12.04
    RUN mkdir -p /dir/subdir
    RUN apt-get update
    
    # Install nodejs
    ADD http://nodejs.org/dist/v0.10.26/node-v0.10.26-linux-x64.tar.gz /dir
    WORKDIR /dir/node-v0.10.26-linux-x64
    RUN ./configure && make && make install
    WORKDIR /dir
    

  • celery + rabbitmq on Docker
  • Docker exec with config file outside of container
  • How to not build gradle subproject using docker plugin if docker not available?
  • docker: Error response from daemon: client is newer than server
  • make test failed when compile Node.js 4.0.0 source code in docker container
  • How to clone docker images from local JFrog artifactory repo to a remote over https
  • One Solution collect form web for “Getting error installing nodejs when building from docker”

    Exit code 127 typically means “command not found”. Chances are build-essentials are not installed.

    Try adding the following after the apt-get update:

    RUN apt-get -y install build-essential
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.