while doing this, I would like to use a dockerfile to configure which plugins will be installed and then build it as a separate jenkins+plugin image. How do I do so?
Thank you!
while doing this, I would like to use a dockerfile to configure which plugins will be installed and then build it as a separate jenkins+plugin image. How do I do so?
Thank you!
There are two things about plugins one is preinstalled plugins and one is storing the installed plugins after jenkins is up. So for pre-installed plugins you will change your compose to below
docker-compose.yml
.dockerignore
Dockerfile
plugins.txt
Now keep
jenkins_home
as volume mounted will make sure all your jenkin changes are persisted. Keeping aplugins.txt
will make sure that your container starts with pre-installed plugins. And the volume mount will persist any of the shared plugin. A key point from documentationPlease refer to below links if you need additional and latest information
https://github.com/jenkinsci/docker/blob/master/README.md