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
|
||||
WORKDIR /src
|
||||
|
||||
COPY gradle ./gradle
|
||||
COPY gradlew settings.gradle.kts build.gradle.kts gradle.properties ./
|
||||
RUN ./gradlew --no-daemon dependencies > /dev/null
|
||||
COPY settings.gradle.kts build.gradle.kts gradle.properties ./
|
||||
RUN gradle --no-daemon dependencies > /dev/null
|
||||
|
||||
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.
|
||||
FROM eclipse-temurin:21-jre-jammy
|
||||
|
||||
Reference in new issue
Block a user