Skip to content

Instantly share code, notes, and snippets.

@jeffersonchaves
Last active April 7, 2025 21:40
Show Gist options
  • Save jeffersonchaves/dbd71d32045cc8eb16359c2858c1c17d to your computer and use it in GitHub Desktop.
Save jeffersonchaves/dbd71d32045cc8eb16359c2858c1c17d to your computer and use it in GitHub Desktop.
dockerfile
FROM ubuntu:latest AS build
RUN apt-get update
RUN apt-get install openjdk-21-jdk -y
COPY . .
RUN apt-get install maven -y
RUN mvn clean install
FROM openjdk:21-jdk-slim
EXPOSE 8080
COPY --from=build /target/thymeleaf-lab-0.0.1-SNAPSHOT.jar app.jar
ENTRYPOINT [ "java", "-jar", "app.jar" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment