#pulling from github FROM alpine/git:v2.30.1 AS code ARG BUILD_ID ARG GITEA_USER ARG GITEA_PASS RUN echo $BUILD_ID LABEL stage=builder LABEL build_id=$BUILD_ID RUN mkdir repo WORKDIR /repo RUN git clone http://$GITEA_USER:$GITEA_PASS@git.io8.dev/risadmin_prod/prod26sep.git #************* Stage 2 - Maven Build ************** FROM maven:3.9.3 AS mvn LABEL stage=builder LABEL build=$BUILD_ID WORKDIR /workspace/app COPY --from=code /repo/prod26sep/prod26sep-back-b/authsec_springboot/backend/ /workspace/app RUN mkdir builder/ RUN mvn install -Dmaven.test.skip #******** Stage 3 - Docker Build ********* #FROM java:8-jdk-alpine FROM openjdk:8-jdk-alpine LABEL stage=app LABEL build=$BUILD_ID RUN mkdir /usr/app COPY --from=mvn /workspace/app/target/*jar /usr/app/gtest.jar RUN mkdir /usr/app/sureops WORKDIR /usr/app EXPOSE 9292 ENTRYPOINT ["java", "-jar", "gtest.jar"]