build: use the Gradle installed in the build image
Avoid downloading the wrapper distribution inside Docker/kaniko builds, where services.gradle.org may be slow or unreachable.
This commit is contained in:
1 parent
a0434d974f
commit
43a3ac8f0e
1 file changed
+3
-4
+3
-4
@@ -3,12 +3,11 @@
|
|||||||
FROM gradle:8.14.3-jdk21 AS build
|
FROM gradle:8.14.3-jdk21 AS build
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
COPY gradle ./gradle
|
COPY settings.gradle.kts build.gradle.kts gradle.properties ./
|
||||||
COPY gradlew settings.gradle.kts build.gradle.kts gradle.properties ./
|
RUN gradle --no-daemon dependencies > /dev/null
|
||||||
RUN ./gradlew --no-daemon dependencies > /dev/null
|
|
||||||
|
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
RUN ./gradlew --no-daemon shadowJar
|
RUN gradle --no-daemon shadowJar
|
||||||
|
|
||||||
# glibc (not Alpine/musl): sqlite-jdbc ships no native library for Linux-Musl.
|
# glibc (not Alpine/musl): sqlite-jdbc ships no native library for Linux-Musl.
|
||||||
FROM eclipse-temurin:21-jre-jammy
|
FROM eclipse-temurin:21-jre-jammy
|
||||||
|
|||||||
Reference in new issue
Block a user