Public Repository

Last pushed: a year ago
Short Description
Docker image for an opinionated and secure Jenkins setup
Full Description

Supported tags and related Dockerfile links

Opinionated Docker image for fast jenkins setup

This docker image will setup a running instance of CI server Jenkins.
It is derived from Jenkins official image and personal biases on plugins/tools/configuration. Please see below for the description of differences regarding the offical image.

Usage

Basic usage

  • Jenkins launch

    docker run -d -p 8080:8080 -p 50000:50000 -v /var/jenkins_home:HOST_DIRECTORY syalioune/jenkins
    

The port 5000 is used to attach build slaves on the master host. Make sure that HOST_DIRECTORY is accessible to the jenkins user on container (uid : 1000 & gid : 1000).

  • Jenkins launch with parameters

    docker run -d -p 8080:8080 -p 50000:50000 -v /var/jenkins_home:HOST_DIRECTORY syalioune/jenkins PARAMETERS
    

    The PARAMETERS should start with double dash (--).
    Please note that those parameters can also be passed through the JENKINS_OPTS environment variable

    docker run -d -p 8080:8080 -p 50000:50000 -v /var/jenkins_home:HOST_DIRECTORY syalioune/jenkins --env JENKINS_OPTS=PARAMETERS
    
  • Arbitrary command execution

    docker run -d -p 8080:8080 -p 50000:50000 -v /var/jenkins_home:HOST_DIRECTORY syalioune/jenkins COMMAND
    

JVM parameters setup

You can pass some parameters to Jenkins JVM through the JAVA_OPTS environment variable.

docker run -d -p 8080:8080 -p 50000:50000 -v /var/jenkins_home:HOST_DIRECTORY syalioune/jenkins --env JAVA_OPTS=PARAMETERS

If not explicitly set on Jenkins launch, the JVM heap size is automatically constrained by the entrypoint script in order to limit the jenkins memory footprint on the host. The default limits are

-Xms512M -Xmx1024M

Going further

For additional information, please refer to documentation

Docker Pull Command
Owner
syalioune

Comments (0)