title: how to run gulp task from dockerfile
body: <p>I am trying to run gulp task from my Dockerfile. Here is my Dockerfile</p>
  
  <pre><code>#
  # Node.js w/ Bower &amp; Grunt Dockerfile
  #
  # https://github.com/digitallyseamless/docker-nodejs-bower-grunt
  #
  
  # Pull base image.
  FROM library/node:4
  MAINTAINER Digitally Seamless &lt;docker@digitallyseamless.com&gt;
  
  # Install Bower &amp; Grunt
  RUN npm install -g bower grunt-cli &amp;&amp; \
      echo '{ "allow_root": true }' &gt; /root/.bowerrc
  
  RUN npm install gulp -y
  RUN gulp ng-config --env development
  
  # Define working directory.
  WORKDIR /data
  COPY . /data
  
  
  # Define default command.
  EXPOSE 7000 
  CMD ["bash"]
  </code></pre>
  
  <p>Please note in above Dockerfile I  am trying to install gulp and run gulp task as follows:</p>
  
  <pre><code>RUN npm install gulp -y
  RUN gulp ng-config --env development
  </code></pre>
  
  <p>where ng-config is my gulp task defined in gulpfile.js file.</p>
  
  <p>when I try to build image with above mentioned Dockerfile content I get error like <em>gulp: not found</em> </p>
  
  <p>I am not sure if gulp is not getting installed properly or why it is not recognizing the gulp command.
  Can you guys please help?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>If I try to install gulp globally, my build fails with following output.</p>
  
  <pre><code>Sending build context to Docker daemon  7.893MB
  Step 1/9 : FROM library/node:4
   ---&gt; 3fb5ca8fcd8e
  Step 2/9 : MAINTAINER Digitally Seamless &lt;docker@digitallyseamless.com&gt;
   ---&gt; Using cache
   ---&gt; 242154cec3ce
  Step 3/9 : RUN npm install -g bower grunt-cli &amp;&amp;     echo '{ "allow_root": true }' &gt; /root/.bowerrc
   ---&gt; Using cache
   ---&gt; b73fc7831a4a
  Step 4/9 : RUN npm install -g gulp -y
   ---&gt; Using cache
   ---&gt; b498e61bfb8e
  Step 5/9 : RUN gulp ng-config --env development
   ---&gt; Running in 38d2e7f208cc
  [08:21:29] Local gulp not found in /
  [08:21:29] Try running: npm install gulp
  The command '/bin/sh -c gulp ng-config --env development' returned a non-zero code: 1
  </code></pre>