Commit 56f807a6 authored by 智勇's avatar 智勇

修改nodejs dockerfile

parent d69a2554
ARG FROM_IMAGE
FROM ${FROM_IMAGE}
FROM node:8.15.0-slim
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
FROM ccr.ccs.tencentyun.com/qa-base/node10 AS builder
WORKDIR /home/quant_group WORKDIR /home/quant_group
COPY package.json package-lock.json ./
COPY .npmrc /root
RUN npm install
ENV NODE_ENV=test FROM ccr.ccs.tencentyun.com/qa-base/node10
WORKDIR /home/quant_group
ARG SYSTEM_NAME COPY --from=builder /home/quant_group/node_modules ./node_modules
ENV SYSTEM_NAME=$SYSTEM_NAME COPY *.tgz docker-entrypoint.sh ./
ARG BUILD_SCHEMA
ENV BUILD_SCHEMA=$BUILD_SCHEMA
RUN echo -e "${BUILD_SCHEMA}" >> ./build_info
COPY docker-entrypoint.sh .
COPY --from=0 /code/* /home/quant_group/project/dist.tgz
CMD ["sh", "docker-entrypoint.sh"] EXPOSE 80
\ No newline at end of file CMD ["sh", "docker-entrypoint.sh"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment