patterndockerMinor
Pre-install Jenkins plugins using Docker image
Viewed 0 times
installimagejenkinsdockerprepluginsusing
Problem
If I have a jenkins docker image:
is there a way to pre-install certain plugins using the Docker image, for example all the bitbucket plugins:
I assume we'd probably have to unpack some tars to the filesystem somewhere like so:
FROM jenkins/jenkins:ltsis there a way to pre-install certain plugins using the Docker image, for example all the bitbucket plugins:
I assume we'd probably have to unpack some tars to the filesystem somewhere like so:
FROM jenkins/jenkins:lts
USER root
WORKDIR /jenkins/main/dir
RUN tar -xvf some-jenkins-plugins.tarSolution
This seems to be the right idea: https://stackoverflow.com/questions/29328278/installing-jenkins-plugins-to-docker-jenkins/29328489#29328489
so in the Dockerfile you'd just use:
I tried it and it worked for me.
so in the Dockerfile you'd just use:
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/plugins.txtI tried it and it worked for me.
Code Snippets
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/plugins.txtContext
StackExchange DevOps Q#8037, answer score: 2
Revisions (0)
No revisions yet.