Official Jenkins Docker image.
We need the list of installed plugins to re-build and re-run our docker image with the already installed plugins. To do this we need to get the list of installed plugins with the below script (See Jenkins Installed Plugins List):
./plugin.sh
This script will generate the file plugins.txt. This file is used in our Dockerfile to install the plugins during the build of the image. When the image is built we can run the new image.
Run Jenkins with docker-compose
docker-compose up
Run Jenkins with docker
docker build -t my-jenkins:1.0.0 .
docker run -p 8080:8080 -p 50000:50000 -v content-folder:/var/jenkins_home my-jenkins:1.0.0
https://stackoverflow.com/questions/41266889/jenkins-2-override-plugins-txt
https://technologyconversations.com/2017/06/16/automating-jenkins-docker-setup/