Running Jenkins as a Docker Container

From NovaOrdis Knowledge Base
Revision as of 23:01, 24 April 2018 by Ovidiu (talk | contribs) (→‎Run)
Jump to navigation Jump to search

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

Build it with:

docker build -t jenkins-with-plugins .

Help

docker run --rm jenkins-with-plugins --help

Run

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

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

The instance will be available at http://localhost:8080/