Skip to content

Commit

Permalink
Merge pull request #21 from leingenm/issue-19
Browse files Browse the repository at this point in the history
Dockerize the app
  • Loading branch information
leingenm authored Aug 29, 2024
2 parents aa256b0 + 6d87038 commit be7f5f7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM gradle:8-jdk17-jammy AS build
WORKDIR /app
COPY settings.gradle.kts ./
COPY build.gradle.kts ./
COPY ./src ./src
RUN gradle build --no-daemon -x test

FROM openjdk:17-jdk-slim
MAINTAINER daverbk, RomanMager
WORKDIR /app
COPY --from=build /app/build/libs/*.jar app.jar

RUN useradd -m ypm-user
USER ypm-user

EXPOSE 8080
ENTRYPOINT ["sh", "-c", "java -jar /app/app.jar"]

0 comments on commit be7f5f7

Please sign in to comment.