-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
43 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
FROM eclipse-temurin:19.0.2_7-jdk-alpine as gradle | ||
RUN apk add --no-cache gradle | ||
FROM eclipse-temurin:19.0.2_7-jdk-alpine as GRADLE | ||
COPY *.gradle gradle.* gradlew /src/ | ||
COPY gradle /src/gradle | ||
WORKDIR /src | ||
RUN ["./gradlew", "--version"] | ||
|
||
FROM gradle as builder | ||
USER root | ||
ENV APP_HOME=/builder | ||
WORKDIR $APP_HOME | ||
COPY . $APP_HOME | ||
RUN gradle build --exclude-task test --stacktrace --no-daemon --no-build-cache --parallel | ||
FROM GRADLE as BUILDER | ||
VOLUME /tmp | ||
WORKDIR /src | ||
COPY . . | ||
RUN [ "./gradlew", "build", "--exclude-task", "test", "--stacktrace", "--no-daemon", "--parallel"] | ||
|
||
FROM eclipse-temurin:19.0.2_7-jre-alpine | ||
WORKDIR /app | ||
expose 8080 | ||
COPY --from=builder "/builder/build/libs/ports-and-adapters-0.0.1-SNAPSHOT.jar" . | ||
CMD ["java", "-jar", "ports-and-adapters-0.0.1-SNAPSHOT.jar"] | ||
COPY --from=BUILDER ports-and-adapters-0.0.1-SNAPSHOT.jar app.jar | ||
EXPOSE 8080 | ||
ENTRYPOINT ["java", "-jar", "app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
FROM eclipse-temurin:19.0.2_7-jdk-alpine as gradle | ||
RUN apk add --no-cache gradle | ||
|
||
FROM gradle as builder | ||
FROM eclipse-temurin:19.0.2_7-jdk-alpine as GRADLE | ||
USER root | ||
ENV APP_HOME=/builder | ||
WORKDIR $APP_HOME | ||
COPY . $APP_HOME | ||
RUN gradle gradle dist --exclude-task test --stacktrace --no-daemon --no-build-cache --parallel | ||
COPY *.gradle gradle.* gradlew /src/ | ||
COPY gradle /src/gradle | ||
WORKDIR /src | ||
RUN ["./gradlew", "--version"] | ||
|
||
FROM GRADLE | ||
COPY . . | ||
ENTRYPOINT [ "./gradlew", "build", "--exclude-task", "test", "--stacktrace", "--no-daemon", "--parallel"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
FROM eclipse-temurin:19.0.2_7-jdk-alpine as gradle | ||
RUN apk add --no-cache gradle | ||
|
||
FROM gradle as builder | ||
FROM eclipse-temurin:19.0.2_7-jdk-alpine as GRADLE | ||
USER root | ||
ENV APP_HOME=/builder | ||
WORKDIR $APP_HOME | ||
COPY . $APP_HOME | ||
RUN gradle test --stacktrace --no-daemon --no-build-cache --parallel | ||
COPY *.gradle gradle.* gradlew /src/ | ||
COPY gradle /src/gradle | ||
WORKDIR /src | ||
RUN ["./gradlew", "--version"] | ||
|
||
FROM GRADLE as BUILDER | ||
COPY . . | ||
RUN ["./gradlew", "clean"] | ||
|
||
FROM BUILDER | ||
ENTRYPOINT [ "./gradlew", "test", "--stacktrace", "--no-daemon", "--parallel"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
org.gradle.caching=true | ||
org.gradle.configureondemand=true | ||
org.gradle.parallel=true |