1. Images & Charts
  2. gradle
gradle

gradle

Dev
Updated 10 hours ago

Gradle Overview

Secure your stack with a hardened Gradle image freshly-built by Minimus. Minimus images always include the most up-to-date package version for all packages and dependencies contained in the image.


Use the Gradle container image to build, test, and run Gradle-based Java projects in a consistent, containerized environment.


Try It Out

To take the Minimus Gradle image for a test run, follow the steps below.

Step 1 - Set Up a Sample Project

Create a sample project folder:

mkdir gradle-docker-test
cd gradle-docker-test

In the new project folder, define a custom Gradle task in a build.gradle file:

// build.gradle
task hello {
    doLast {
        println 'Hello from Minimus!'
    }
}

In our example, we defined the hello task to print a greeting.

Step 2 - Run Gradle using Docker

You can now run your Gradle container, mount the project folder, and execute the hello task:

docker run --rm \
  --user "$(id -u):$(id -g)" \
  -v "$PWD":/home/gradle/project \
  -v gradle-cache:/home/gradle/.gradle \
  -w /home/gradle/project \
  reg.mini.dev/gradle \
  gradle hello --warning-mode=none

You should see Gradle output similar to the following in your terminal:

Welcome to Gradle 8.14.3!

...

> Task :hello
Hello from Minimus!

Technical Considerations

The Gradle image provided by Minimus is a slim, security-hardened alternative to the public image from Docker Hub. The images are largely interchangeable, with a few differences as noted below.

Gradle built by Minimus:

  1. Runs as non-root by default for a security-first approach that protects against privilege escalation attacks. The public image runs as root.
  2. Drill down on the version specification tab to see the default user, listening ports, entrypoint, volumes, environment variables, etc.

The Payoff

A hardened, minimal image that will remain more secure for the long run and accrue vulnerabilities at a slower rate.


Terms & Info

Trademark

This catalog is published by Minimus. All product names, logos, and marks, other than those belonging to Minimus, shown are owned by their respective rights holders and appear here only to identify the open source software each image contains. Minimus claims no ownership of those marks and implies no affiliation with, endorsement by, certification by, or sponsorship by any rights holder.

Disclaimer

Images are provided "as-is" without warranty of any kind. "Hardened" refers to the security configuration applied at the time of build and does not constitute a guarantee of ongoing security or absence of vulnerabilities. The free tier is provided without support, SLA, or guaranteed patching timelines. Security updates may be applied to paid subscriptions before or instead of free tier images. By pulling or using any image you agree to our Terms of Use.