Skip to content

Commit

Permalink
fix(docker): copy the correct jar file (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuruyia authored Jan 11, 2024
1 parent 12baec0 commit fd32103
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ COPY ./gradle.properties .
COPY ./gradlew .
COPY ./settings.gradle.kts .

RUN --mount=type=cache,target=/root/.gradle ./gradlew clean build -x test
RUN --mount=type=cache,target=/root/.gradle ./gradlew clean bootJar

# Run stage
FROM amazoncorretto:17-alpine AS run
ARG SERVICE_NAME
WORKDIR /app

COPY --from=build /app/$SERVICE_NAME/build/libs/*-SNAPSHOT.jar ./app.jar
COPY --from=build /app/$SERVICE_NAME/build/libs/$SERVICE_NAME.jar ./app.jar

ENTRYPOINT ["java", "-jar", "./app.jar"]

0 comments on commit fd32103

Please sign in to comment.