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