Running Jenkins as a Docker Container: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 7: Line 7:
=Image with Pre-Installed Recommended Plugins=
=Image with Pre-Installed Recommended Plugins=


The image was configured so plugins and the WAR content will be part of the image, while $JENKINS_HOME is written on an external volume on the host system:
The following Dockerfile builds an image that contains all recommended plugins, and [[Jenkins Docker Plugin#Overview|Jenkins Docker Plugin]]. The image was configured so plugins and the WAR content will be part of the image, while $JENKINS_HOME is written on an external volume on the host system:


{{External|https://github.com/NovaOrdis/playground/blob/master/jenkins/docker/jenkins-with-plugins/Dockerfile}}
{{External|https://github.com/NovaOrdis/playground/blob/master/jenkins/docker/jenkins-with-plugins/Dockerfile}}

Revision as of 22:35, 24 April 2018

Internal

Overview

Image with Pre-Installed Recommended Plugins

The following Dockerfile builds an image that contains all recommended plugins, and Jenkins Docker Plugin. The image was configured so plugins and the WAR content will be part of the image, while $JENKINS_HOME is written on an external volume on the host system:

https://github.com/NovaOrdis/playground/blob/master/jenkins/docker/jenkins-with-plugins/Dockerfile

Help

docker run --rm jenkins/jenkins:LTS --help

Run

The following command line assumes that the image was modified to maintain the plugin and WAR directories in custom locations:

docker run --rm -p 8080:8080 -v /var/lib/jenkins:/var/jenkins_home jenkins/jenkins:LTS