Skip to content

Instantly share code, notes, and snippets.

@initcron
Created October 19, 2022 10:39
Show Gist options
  • Save initcron/f9940e8fd96fd8abdcb9a9c1b76ab2ac to your computer and use it in GitHub Desktop.
Save initcron/f9940e8fd96fd8abdcb9a9c1b76ab2ac to your computer and use it in GitHub Desktop.
Single Stage Dockerfile for Sprint Petclinic App
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
WORKDIR /run
CMD java -jar petclinic.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment