Custom Jenkins image with all needed plugins pre-installed
1.8K
Custom jenkins image with all plugins installed
Follow recommendation of Jenkins Chart team as explained here
Each plugins is available in https://plugins.jenkins.io/ Or just by typing https://plugins.jenkins.io/
Eg: https://plugins.jenkins.io/apache-httpcomponents-client-4-api
You can also check this URL to get the list : https://updates.jenkins.io/download/plugins/
As described https://github.com/jenkinsci/docker#updating-plugins-file-preview,
You can run the following command to update the plugin list according to the current Jenkins version :
docker run -it europe-west1-docker.pkg.dev/ldf-bridge-trs-prj-001/ldf-bridge-trs-reg-docker/jenkins:latest bash -c "stty -onlcr && jenkins-plugin-cli -f /usr/share/jenkins/ref/plugins.txt --available-updates --output txt" > plugins.txt
You can notice that jenkins-plugin-cli tools make some checks between plugins dependencies :youhou:
workflow-cps:2.87 workflow-support:3.7 junit:1.47 github-api:1.117 plugin-util-api:1.6.0 trilead-api:1.0.13
This image should follow Jenkins base image. So we follow this scheme for all tags :
europe-west1-docker.pkg.dev/ldf-bridge-trs-prj-001/ldf-bridge-trs-reg-docker/jenkins:<jenkins-version>-<iteration>
For example :
With FROM jenkinsjenkins:2.233 and the first release of this image,
it will be
europe-west1-docker.pkg.dev/ldf-bridge-trs-prj-001/ldf-bridge-trs-reg-docker/jenkins:2.333-0
Do not forget to create a git tag in order to trigger the image build. Following our example it would be:
git tag jenkins-2.333-0
git push origin --tags
Before creating a new PR, please be sure that your new Jenkins image will works. There no automation for instance. To check that you can simply start your image after build it
docker build . -t europe-west1-docker.pkg.dev/ldf-bridge-trs-prj-001/ldf-bridge-trs-reg-docker/jenkins:latest
docker run -p 8080:8080 -p 50000:50000 europe-west1-docker.pkg.dev/ldf-bridge-trs-prj-001/ldf-bridge-trs-reg-docker/jenkins:latest
And be sure that Jenkins answer on http://localhost:8080
Content type
Image
Digest
Size
663 MB
Last updated
over 4 years ago
docker pull solocal/jenkins