我使用了一个docker文件执行package.json文件,但是它停在了
GithubDatasetAPI@0.0.0开始/ usr / src / app节点./bin/www
并且不会更进一步或不会显示错误消息。我更新为“ \ node ./bin/www”,但对我不起作用
这是我的DOCKERFILE
FROM node:8
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm install --only=production
# Bundle app source
COPY . .
EXPOSE 8082
CMD [ "npm", "start" ]
答案 0 :(得分:0)
尝试复制所有文件,而不仅仅是package.json
COPY ./ ./
代替
COPY package*.json ./