Dockerfile 455 B

123456789101112131415
  1. FROM node:16.16.0
  2. WORKDIR /app
  3. # 时区
  4. ENV TZ=Asia/Shanghai \
  5. DEBIAN_FRONTEND=noninteractive
  6. RUN ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime && echo ${TZ} > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata
  7. # npm 源,选用国内镜像源以提高下载速度
  8. #RUN npm config set registry https://mirrors.cloud.tencent.com/npm/
  9. COPY . /app
  10. RUN npm install --only=production
  11. CMD ["npm", "start"]
  12. ENTRYPOINT [ "npm", "start" ]