我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中是否有缺失?