Dockerfile 273 B

1234567891011
  1. FROM node:14.17.6
  2. WORKDIR /app
  3. #把.nuxt目录下的所有内容复制到/app/.nuxt/
  4. COPY . /app/
  5. #安装核心依赖 npm cache clean -f
  6. RUN ["npm","install","--registry=https://registry.npm.taobao.org"]
  7. RUN ["npm","run","build"]
  8. EXPOSE 3000
  9. CMD ["npm", "run", "start"]