In Jenkins X, it is possible to create your custom Builders (aka POD templates) or overwrite existing onces. You just need to base your Docker
image on this builder-base image or on its slim version.
These images contain a number of pre-installed tools which get constantly updated and published to Docker Hub.
Create a custom Builder from scratch
First you need to create a docker image for your builder. For instance a starting Dockerfile can look like this:
# Install your tools and libraries
RUN yum install -y gcc openssl-devel
Now you can build the image and publish it to your registry:
Do not worry, you do not have to run manually these steps every time when a new image needs to be built.
Jenkins X can manage this for you. You just need to push your Dockerfile in a repository similar with this
one. Adjust the Jenkinsfile according with your organization and
application name, and then import the repository into your Jenkins X platform with:
jx import --url <REPOSITORY_URL>
From now on, every time you push a change, Jenkins X will build and publish automatically the image.
Install the Builder
You can now install your builder either when you install Jenkins X or upgrade it.
Create a myvalues.yaml file in your ~/.jx/ folder with the following content: