Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
# Runs the Java/Gradle build and test suite with no local JDK install.
#
# Source is bind-mounted at `docker run` time -- this image is not rebuilt
# per code change. Gradle 6.9.2 (pulled by the wrapper regardless of this
# image's bundled Gradle version) can't parse Java 17 bytecode when
# compiling build.gradle/settings.gradle, so the JDK here is pinned to 11.
# per code change. build.gradle uses the legacy `maven` plugin, removed in
# Gradle 7+, so the build only works under the wrapper-pinned Gradle 6.9.2
# (see gradle/wrapper/gradle-wrapper.properties) -- not whatever `gradle`
# version a base image happens to bundle. The JDK here is pinned to 11
# because that 6.9.2/Groovy-DSL combo can't parse newer bytecode when
# compiling build.gradle/settings.gradle.
#
# The gradle:* image's default GRADLE_USER_HOME is /home/gradle/.gradle --
# mount a named volume there to cache resolved dependencies across runs:
# The wrapper distribution is resolved and cached into an image layer at
# build time (`./gradlew --version` below) rather than left to download on
# first `docker run` -- same version pin, but the image is self-contained
# and works offline. GRADLE_USER_HOME matches the default the gradle:*
# image used, so existing gradle-cache volumes from that image still work.
#
# docker build -t datatransferproject/dev .
# docker run --rm -v "$PWD":/workspace -v gradle-cache:/home/gradle/.gradle datatransferproject/dev
FROM gradle:8.10.2-jdk11
FROM eclipse-temurin:11-jdk-jammy

ENV GRADLE_USER_HOME=/home/gradle/.gradle
WORKDIR /workspace

COPY gradlew gradlew
COPY gradle/wrapper gradle/wrapper
RUN ./gradlew --version --no-daemon

ENTRYPOINT ["./gradlew"]
CMD ["--no-daemon", "check"]
Loading