Public | Automated Build

Last pushed: 7 months 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 file when creating the container:

docker create --name gradle \
              -v <full path to>:/home/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
Source Repository