Skip to content

Commit

Permalink
- Update the docker build to java 21, gradle 8, and include the libs.…
Browse files Browse the repository at this point in the history
…versions.toml file
  • Loading branch information
dcshock committed Jan 15, 2025
1 parent f8d03f7 commit 1ec4aec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
build
scripts
gradle
.idea
.gradle
.github
Expand Down
6 changes: 4 additions & 2 deletions docker/Dockerfile-service
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM gradle:7.4.2-jdk11 AS build
FROM gradle:8-jdk21-graal AS build
RUN gradle --version && java -version
RUN ls -l
WORKDIR /app

# Only copy dependency-related files
Expand All @@ -15,13 +16,14 @@ COPY build.gradle.kts gradle.properties settings.gradle.kts /app/
COPY api-model /app/api-model/
COPY database /app/database/
COPY service /app/service/
COPY gradle/libs.versions.toml /app/gradle/libs.versions.toml
COPY CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE README.md /app/
COPY .git /app/.git/

# Do the actual build
RUN gradle clean build --no-daemon

FROM openjdk:11-jre
FROM openjdk:21-jdk

COPY --from=build /app/service/build/libs/*.jar /service.jar
ADD docker/service-configure /configure
Expand Down

0 comments on commit 1ec4aec

Please sign in to comment.