I am trying to deploy a single docker container to elastic beanstalk and my run command gulp production && node server.js
. Docker keeps throwing the error Local gulp not found in /app/user ... try running npm install gulp
. I have tried listing gulp in my package.json file as both a depdency and devDependecy, but that does not solve the issue. I am also trying to install gulp globally in my Dockerfile.
Can someone tell me what is wrong with my set up ? Here are my files:
Dockerfile
FROM node:6.5.0
# Internally, we arbitrarily use port 3000
ENV PORT 3000
# Create some needed directories
RUN mkdir -p /app/user/
WORKDIR /app/user/
# setup path
ENV PATH /app/user/node_modules/.bin:$PATH
RUN npm install -g gulp
# Install vim
RUN apt-get update && apt-get --yes --force-yes install vim
# Setup app
ADD package.json /app/user/
RUN cd /app/user && npm install
# ADD . /app/user/
EXPOSE 3000
CMD gulp production && node server.js
Dockerrun.aws.json
{
"AWSEBDockerrunVersion": "1",
"Logging": "/var/log/pm2",
"Volumes": [
{
"HostDirectory": "/var/app/current",
"ContainerDirectory": "/app/user"
}
]
}