title: Install node in Dockerfile?
body: <p>I am user of AWS elastic beanstalk, and I have a little problem. I want to build my CSS files with less+node. But I don`t know how to install node in my dockerfile, when building with jenkins. </p>
  
  <p>Here is installation packages what I am using in my docker. I will be glad for any suggestions.</p>
  
  <pre><code>FROM php:5.6-apache
  
  
  # Install PHP5 and modules along with composer binary
  RUN apt-get update
  RUN apt-get -y install \
      curl \
      default-jdk \
      git \
      libcurl4-openssl-dev \
      libpq-dev \
      libmcrypt-dev \
      libpq5 \
      npm \
      node \
      zlib1g-dev \
      libfreetype6-dev \
      libjpeg62-turbo-dev \
      libpng12-dev
  
  RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
  
  RUN docker-php-ext-install curl json mbstring opcache pdo_mysql zip gd exif sockets mcrypt
  
  # Install pecl
  RUN pecl install -o -f memcache-beta \
      &amp;&amp; rm -rf /tmp/pear \
      &amp;&amp; echo 'extension=memcache.so' &gt; /usr/local/etc/php/conf.d/memcache.ini
  </code></pre>
  
  <p>After this I am runing my entrypoint.sh with code</p>
  
  <pre><code>#!/usr/bin/env sh
  
  composer run-script post-install-cmd --no-interaction
  
  chmod 0777 -R /var/app/app/cache
  chmod 0777 -R /var/app/app/logs
  
  exec apache2-foreground
  </code></pre>
  
  <p>But then I`ve got this error</p>
  
  <pre><code> Error Output: [2016-04-04 11:23:44] assetic.ERROR: The template ":tmp:module.html.twig" contains an error: A template that extends another one cannot have a body in ":tmp:module.ht  
    ml.twig" at line 7.     
  </code></pre>
  
  <p>But when I install inside the Docker container node this way</p>
  
  <pre><code>apt-get install git-core curl build-essential openssl libssl-dev
   git clone https://github.com/nodejs/node.git
   cd node
   ./configure
   make
   sudo make install
   node -v
  </code></pre>
  
  <p>I can build my CSS. So question is..how this installation above make install inside my Dockerfile when I am building it with Jenkins?</p>