【发布时间】:2019-11-06 11:43:51
【问题描述】:
在 Jenkins 和 docker 中使用常见的 CI/CD 工作流程。将应用程序部署到没有外部互联网连接的服务器,只有詹金斯有外部互联网,所以我正在构建节点应用程序:
npm install
在 jenkins 管道中,然后将其部署到 docker 容器中。
Dockerfile:
FROM node:12
WORKDIR /var/www/cms
COPY . .
RUN chmod +x ./strapi.sh
EXPOSE 1337
CMD ["./strapi.sh"]
npm install 之后,我将整个目录复制到 docker 容器中,该步骤大约需要 15 分钟才能完成。加快速度的最佳方法是什么?
【问题讨论】: