Dockerfile for the
Docker Hub images which contains Java and Gradle.
- Gradle 4.4
GRADLE_USER_HOMEis set at
GRADLE_HOMEis set at
- A mount point is created at
- The working directory is set to
Assuming the Gradle Java starter project in the
working directory, one can run the
build target by
docker run --rm -v $(pwd):/app jaysong/gradle:8-4.4 gradle build
One can also mount a host directory to the
GRADLE_USER_HOME volume so as avoid
downloading the same dependency multiple times across builds.
docker run --rm -v $(pwd):/app -v /tmp/gradle-cache:/cache/gradle jaysong/gradle:8-4.4 gradle build