Skip to content

Instantly share code, notes, and snippets.

@initcron
Created November 23, 2022 15:13
Show Gist options
  • Save initcron/c7d93aff465f1fd84b48e2d4729e61f1 to your computer and use it in GitHub Desktop.
Save initcron/c7d93aff465f1fd84b48e2d4729e61f1 to your computer and use it in GitHub Desktop.
Spring Petclinic Single Stage Dockerfile
FROM schoolofdevops/maven:spring
WORKDIR /app
COPY . .
RUN mvn spring-javaformat:apply && \
mvn package -DskipTests && \
mv target/spring-petclinic-2.3.1.BUILD-SNAPSHOT.jar /run/petclinic.jar
EXPOSE 8080
CMD java -jar /run/petclinic.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment