From 46a32efe91b9f3c4553a40f1f0f15a1a89a9a739 Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 11 Dec 2024 08:48:27 -0700 Subject: [PATCH] conatiner change --- backend/Dockerfile | 13 ++++++------- backend/build.gradle.kts | 10 ---------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index b0d6c21b..a795adff 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,10 +1,9 @@ -FROM openjdk:11-jre-slim as build +FROM amazoncorretto:17 + WORKDIR /app/ -ARG JAR_FILE -FROM openjdk:11-jre-slim -ARG JAR_FILE -COPY --from=build ${JAR_FILE} app.jar +COPY . . + +RUN chmod +x ./gradlew -EXPOSE 8081 -ENTRYPOINT ["java","-jar","/app.jar"] \ No newline at end of file +ENTRYPOINT [ "./gradlew", "bootRun", "--continuous", "--args=--server.port=8081" ] \ No newline at end of file diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 62c20ead..e4f26832 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -43,13 +43,3 @@ dependencies { tasks.withType { useJUnitPlatform() } - -plugins { - id 'com.palantir.docker' version '0.25.0' // Or the latest version -} - -docker { - name "${project.name}:${project.version}" - files bootJar.archiveFile - buildArgs(['JAR_FILE': "${bootJar.archiveFileName.get()}"]) -} \ No newline at end of file