FROM maven:3-openjdk-11 AS MAVEN_BUILD COPY pom.xml /build/ COPY elastic /build/elastic/ COPY web /build/web/ WORKDIR /build/ RUN mvn package FROM adoptopenjdk/openjdk11:alpine-jre WORKDIR /app COPY --from=MAVEN_BUILD /build/web/target/web-1.0-SNAPSHOT.jar /app/app.jar ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-Dspring.profiles.active=${PROF}", "-Dspring.config.additional-location=/files/config/", "-cp", "/app/app.jar", "-Dloader.path=/files/repo-jars", "org.springframework.boot.loader.PropertiesLauncher"]