Public | Automated Build

Last pushed: 21 days ago
Short Description
A container used to cache gradle artifacts
Full Description

Gradle artifact cache container

Create the cache container

Create the container using the following

docker create --name gradle omnisol/gradle

This will create a container named gradle which will only serve as a storage for artifacts.

Optionally, you can map a gradle.properties file when creating the container:

docker create --name gradle \
              -v <full path to gradle.properties>:/home/gradle/gradle.properties \
              omnisol/gradle

Running gradlew

When inside a project folder containing the gradlew script, run the following to use the artifact cache:

docker run --rm \
           --volumes-from gradle \
           -v `pwd`:/var/`basename $PWD` \
           -w /var/`basename $PWD` \
           omnisol/gradle ./gradlew <command>

This is equivalent to running ./gradlew \<command\>, only that it runs in a temporary container,
using the artifact cache from the gradle container.

Docker Pull Command
Owner
omnisol
Source Repository

Comments (0)