我Dockerfile如下图所示:码头工人不识别NPM install命令并抛出错误
From ubuntu:14.04
WORKDIR /app
#COPY package.json /app/package.json
COPY . /app
RUN npm install
EXPOSE 3000
CMD ["npm","start"]
现在,当我运行命令sudo docker -t my-app .
。它给我以下错误:
Sending build context to Docker daemon 453.6 kB Sending build context to Docker daemon Step 0 : FROM ubuntu:14.04 ---> 37a9c4a8276c Step 1 : WORKDIR /app ---> Using cache ---> a83d4ef27948 Step 2 : COPY . /app ---> 1029f5d7d8a3 Removing intermediate container eb9e7ea7f7e6 Step 3 : RUN npm install ---> Running in 5d4f2c05d2d8 /bin/sh: 1: npm: not found INFO[0000] The command [/bin/sh -c npm install] returned a non-zero code: 127
我的Dockerfile中是否有缺失?