-
-
Save srossillo/eadd240849a14385853b85440454be9e to your computer and use it in GitHub Desktop.
Multi-Platform Dockerfiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM --platform=$BUILDPLATFORM amazoncorretto:11 as builder | |
COPY . /srv/ | |
WORKDIR /srv | |
RUN ./mvnw -DskipTests=true package spring-boot:repackage | |
FROM amazoncorretto:11 | |
COPY --from=builder /srv/target/my-service-0.0.1-SNAPSHOT.jar /srv/ | |
EXPOSE 8080 | |
ENTRYPOINT ["java", "-jar", "/srv/my-service-0.0.1-SNAPSHOT.jar"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment