Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleDockerfile
FROM gradlemaven:43.2.15-jdk8jdk-alpine8 asAS build
buildCOPY 
WORKDIRsrc /usr/src/app
 /src
COPY pom.xml /app
COPY .usr/src /app/src
 
user root
 
RUN chmodmvn +x ./mvnw
RUN ./mvnw-f /usr/src/app/pom.xml clean package -Dmaven.test.skip=true

FROM openjdk:8-jdk-alpine
COPY --from=build /usr/src/app/target/*.jar /app.jar 

EXPOSE 8080

ENTRYPOINT ["java","-jar","/app.jar"]

...