提交 6e381a04 作者: 杨大同

更新 Dockerfile-pred

上级 00a18500
流水线 #44574 已取消 于阶段
in 27 秒
# This file is a template, and might need editing before it works on your project.
FROM registry-vpc.cn-beijing.aliyuncs.com/qianjia2018/qianjia_public:dist-node as build-stage
WORKDIR /app
COPY package*.json ./
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
RUN npm config set registry http://172.17.3.95:9000/repository/node-public && npm install
COPY . .
RUN npm run pred
FROM registry-vpc.cn-beijing.aliyuncs.com/qianjia2018/qianjia_public:dist-nginx as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
FROM registry-vpc.cn-beijing.aliyuncs.com/qianjia2018/qianjia_public:dist-node
LABEL QianJia.ZhangPeng <zanpen2000@gmail.com>
ADD package.json /tmp/package.json
RUN cd /tmp && npm config set registry http://172.17.3.95:9000/repository/node-public && npm install && npm install pm2 -g
RUN mkdir -p /opt/app && cp -a /tmp/node_modules /opt/app/
WORKDIR /opt/app
ADD . /opt/app
EXPOSE 8009
CMD pm2 start apps.config.js --env pred --no-daemon
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论