I am trying to run gulp task from my Dockerfile. Here is my Dockerfile
#
# Node.js w/ Bower & Grunt Dockerfile
#
# https://github.com/digitallyseamless/docker-nodejs-bower-grunt
#
# Pull base image.
FROM library/node:4
MAINTAINER Digitally Seamless <docker@digitallyseamless.com>
# Install Bower & Grunt
RUN npm install -g bower grunt-cli && \
    echo '{ "allow_root": true }' > /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"]
Please note in above Dockerfile I am trying to install gulp and run gulp task as follows:
RUN npm install gulp -y
RUN gulp ng-config --env development
where ng-config is my gulp task defined in gulpfile.js file.
when I try to build image with above mentioned Dockerfile content I get error like gulp: not found
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?
EDIT:
If I try to install gulp globally, my build fails with following output.
Sending build context to Docker daemon  7.893MB
Step 1/9 : FROM library/node:4
 ---> 3fb5ca8fcd8e
Step 2/9 : MAINTAINER Digitally Seamless <docker@digitallyseamless.com>
 ---> Using cache
 ---> 242154cec3ce
Step 3/9 : RUN npm install -g bower grunt-cli &&     echo '{ "allow_root": true }' > /root/.bowerrc
 ---> Using cache
 ---> b73fc7831a4a
Step 4/9 : RUN npm install -g gulp -y
 ---> Using cache
 ---> b498e61bfb8e
Step 5/9 : RUN gulp ng-config --env development
 ---> 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
 
    