diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..37d76fa --- /dev/null +++ b/Dockerfile @@ -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"]