Member-only story

Creating a CI Build Container with Gradle pre-installed

Colin But
3 min readNov 11, 2024

--

In this very short article i am going to show you how you can easily and simply create a CI build container that contains Gradle pre-baked that you can use in your CI builds.

Use Case

The use case of this is clear.

Gradle is a basically a build tool that enables to build and manage your application dependencies for your Java project.

Gradle is like a equivalent to Maven.

Gradle requires Java to be executed.

Therefore, for the Docker container we base it off a openjdk:8docker container image. This image will provide pre-installed Java from the OpenJDK distribution and here i select the Java 8 version.

FROM openjdk:8

Next, since the openjdk:8 image is based off from a CentOS build we use its yum package manager to first update its dependencies list to pull in the updated information from the package manager’s registry and then installing a small utility in wget which then should allows to download a package…

--

--

Colin But
Colin But

Written by Colin But

Writer sharing thoughts on pretty much everything. P.S. I’m a Coffee-Addict ☕ You can support me by buying me a coffee: https://bit.ly/3hQ5M63

No responses yet

Write a response