According to the README.md file in the official JenkinsCI for Docker repository, I have started a jenkins master in a docker container with a named volume such as this
$ docker run -d \
--publish 8080:8080 \
--volume jenkins_home:/var/jenkins_home \
--name jenkins_master \
jenkins
After that, I have used the browser to:
localhost:8080
, All worked fine.
Later i tried to install some jenkins plugins via CLI (instead of the web console) like the following
$ docker exec -it jenkins_master /bin/bash
$ install-plugins.sh hockeyapp
It shows that everything installed correctly. However, when i visit localhost:8080
via the browser, i see that the hockeyapp
plugin was not installed.
How can i make sure that plugins are available from the web console, while I install them from docker exec
CLI?
Noteworthy, i found that there are 2 different plugins folder. One where hockeyapp
is available. One where hockeyapp
is not available.
$ ls /usr/share/jenkins/ref/plugins/ # shows hockeyapp
$ ls /var/jenkins_home/plugins/ # does not show hockeyapp
The install-plugins.sh
is designed for pre-installing plugins.
Plugins that you install in that way will be picked up when the container starts, from the /usr/share/jenkins/ref/plugins/
directory that you mentioned.
Try restarting (or stopping and then starting) the container again. After that you should see the newly installed plugins appear correctly in the web console.