0👍
✅
Are you sure npm install
is being called in the correct directory? You copy package.json
to /app
but run npm install
from an unknown folder. You can try:
COPY ./package.json /app/
RUN cd /app/ && npm install
But I think you’d want to install gulp
globally anyway, so you can skip package.json
and just use:
RUN npm install -g gulp-cli
This way whatever calls gulp
should have it in PATH
and not just that specific directory.
Also, if you want to get a Docker image with both Python 3.7 and Node.js 10 already installed, you can use combos/python_node:3.7_10
. It’s rebuilt daily to contain the latest versions of both images.
Source:stackexchange.com