fix: optimize dockerfile to use external gradle build
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 37s
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 37s
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
.git
|
.git
|
||||||
.gradle
|
.gradle
|
||||||
.idea
|
.idea
|
||||||
build/
|
build/
|
||||||
@@ -9,3 +9,4 @@ bin/
|
|||||||
*/bin/
|
*/bin/
|
||||||
out/
|
out/
|
||||||
*/out/
|
*/out/
|
||||||
|
!*/build/libs/*.jar
|
||||||
|
|||||||
@@ -1,19 +1,8 @@
|
|||||||
FROM eclipse-temurin:21-jdk-alpine AS builder
|
|
||||||
WORKDIR /app
|
|
||||||
COPY gradlew .
|
|
||||||
COPY gradle gradle
|
|
||||||
COPY build.gradle settings.gradle ./
|
|
||||||
|
|
||||||
COPY dap-tool-core dap-tool-core
|
|
||||||
COPY dap-gateway dap-gateway
|
|
||||||
RUN chmod +x gradlew
|
|
||||||
RUN ./gradlew clean :dap-gateway:build -x test
|
|
||||||
|
|
||||||
FROM eclipse-temurin:21-jre-alpine
|
FROM eclipse-temurin:21-jre-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN apk add --no-cache tzdata
|
RUN apk add --no-cache tzdata
|
||||||
ENV TZ=Asia/Seoul
|
ENV TZ=Asia/Seoul
|
||||||
COPY --from=builder /app/dap-gateway/build/libs/*-SNAPSHOT.jar app.jar
|
COPY dap-gateway/build/libs/*-SNAPSHOT.jar app.jar
|
||||||
EXPOSE 8081
|
EXPOSE 8081
|
||||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,8 @@
|
|||||||
FROM eclipse-temurin:21-jdk-alpine AS builder
|
|
||||||
WORKDIR /app
|
|
||||||
COPY gradlew .
|
|
||||||
COPY gradle gradle
|
|
||||||
COPY build.gradle settings.gradle ./
|
|
||||||
|
|
||||||
COPY dap-tool-core dap-tool-core
|
|
||||||
COPY dap-tool-oth dap-tool-oth
|
|
||||||
RUN chmod +x gradlew
|
|
||||||
RUN ./gradlew clean :dap-tool-oth:build -x test
|
|
||||||
|
|
||||||
FROM eclipse-temurin:21-jre-alpine
|
FROM eclipse-temurin:21-jre-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN apk add --no-cache tzdata
|
RUN apk add --no-cache tzdata
|
||||||
ENV TZ=Asia/Seoul
|
ENV TZ=Asia/Seoul
|
||||||
COPY --from=builder /app/dap-tool-oth/build/libs/*-SNAPSHOT.jar app.jar
|
COPY dap-tool-oth/build/libs/*-SNAPSHOT.jar app.jar
|
||||||
EXPOSE 8084
|
EXPOSE 8084
|
||||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,8 @@
|
|||||||
FROM eclipse-temurin:21-jdk-alpine AS builder
|
|
||||||
WORKDIR /app
|
|
||||||
COPY gradlew .
|
|
||||||
COPY gradle gradle
|
|
||||||
COPY build.gradle settings.gradle ./
|
|
||||||
|
|
||||||
COPY dap-tool-core dap-tool-core
|
|
||||||
COPY dap-tool-sms dap-tool-sms
|
|
||||||
RUN chmod +x gradlew
|
|
||||||
RUN ./gradlew clean :dap-tool-sms:build -x test
|
|
||||||
|
|
||||||
FROM eclipse-temurin:21-jre-alpine
|
FROM eclipse-temurin:21-jre-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN apk add --no-cache tzdata
|
RUN apk add --no-cache tzdata
|
||||||
ENV TZ=Asia/Seoul
|
ENV TZ=Asia/Seoul
|
||||||
COPY --from=builder /app/dap-tool-sms/build/libs/*-SNAPSHOT.jar app.jar
|
COPY dap-tool-sms/build/libs/*-SNAPSHOT.jar app.jar
|
||||||
EXPOSE 8082
|
EXPOSE 8082
|
||||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user