FROM maven:3.6.0-jdk-8-alpine AS MAVEN_BUILD
MAINTAINER Sushil
COPY pom.xml /build/
COPY src /build/src/
WORKDIR /build/
RUN mvn package
FROM openjdk:8-jre-alpine
WORKDIR /app
COPY --from=MAVEN_BUILD /build/target/name.jar /app/
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "name.jar"]
No comments:
Post a Comment