Skip to content

Instantly share code, notes, and snippets.

@shashanthk
Created July 27, 2024 11:31
Show Gist options
  • Select an option

  • Save shashanthk/3d7dd535bf77c5ab1da18ebf72df9ddb to your computer and use it in GitHub Desktop.

Select an option

Save shashanthk/3d7dd535bf77c5ab1da18ebf72df9ddb to your computer and use it in GitHub Desktop.

Revisions

  1. shashanthk created this gist Jul 27, 2024.
    14 changes: 14 additions & 0 deletions Dockerfile.springboot
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    ## JDK
    FROM eclipse-temurin:21-alpine

    ## container direcotry
    WORKDIR /app

    ## copy build file from host to container
    COPY target/jar-file-name.jar /app

    ## expose service port
    EXPOSE 8080

    ## start service
    CMD ["java", "-jar", "jar-file-name.jar"]