后端打包dockerFile内容
FROM openjdk:8-alpine
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
ENV projectName operation
RUN mkdir -p /home/${projectName}
WORKDIR /home/${projectName}
COPY ./ /home/${projectName}
ENV active dev
CMD sh /home/${projectName}/server.sh restart ${active} null
前端打包dockerFile内容
FROM nginx
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
#将编译后目录内容复制到nginx容器内部
COPY dist /usr/share/nginx/html/
RUN mkdir -p /usr/share/nginx/html/yicloud_peration
COPY dist /usr/share/nginx/html/yicloud_peration
EXPOSE 80
然后执行命令打包
docker build . -t documentSystem:dev1.0.0
docker重命名镜像名称
docker tag documentsystem:dev1.0.1 172.168.60.200:8099/public/documentsystem:dev1.0.1
推送到harbor里
docker push 172.168.60.200:8099/public/documentsystem:dev1.0.1