HUB
Sign inSign up
docker4jcasc logo

praqma/docker4jcasc

By praqma

•Updated about 9 years ago

Jenkins with Configuration as Code Plugin installed

Image
1

587

praqma/docker4jcasc repository overview

⁠What is docker4jcasc

JCasC - Jenkins Configuration as Code Plugin⁠ is a way to manage Jenkins configuration as versioned files managed in SCM, which can be tested, discussed and validated in various environment before they actually update the production target.

If also means it is easy to restore previous configuration or quickly spin-up new Jenkins instance if there is a need.

praqma/docker4jcasc is an image based on Jenkins with JCasC Plugin preinstalled

⁠How to use it

praqma/docker4jcasc requires two environment variables to be set and passed when running the container. Variables are used to specify the location on jenkins.yaml and plugins.yml file. More details about how to use the file to configure Jenkins available at plugin page⁠

⁠Setting environment variables

As an example files from plugin repository can be used:

export JENKINS_CONF=https://raw.githubusercontent.com/Praqma/configuration-as-code-plugin/4157ec101c51c2e0277531e2f9f3eebe7f4e5904/jenkins.yaml export JENKINS_PLUGINS=https://raw.githubusercontent.com/Praqma/configuration-as-code-plugin/master/plugins.yml

⁠Running the container

Use docker-compose up -d --no-build to run the container with following docker-compose.yml:

version: "2"

services:
  jmaster:
    image: praqma/docker4jcasc:latest
    build:
      context: .
      args:
        - JAVA_OPTS
    restart: unless-stopped
    logging:
      driver: "json-file"
      options:
        max-size:  "200m"
        max-file: "3"
    ports:
      - "8080:8080"
      - "50000:50000"
    volumes:
      - ./jenkins_home:/var/jenkins_home
      - /etc/localtime:/etc/localtime
    environment:
      - JENKINS_CONF=${JENKINS_CONF}
      - JENKINS_PLUGINS=${JENKINS_PLUGINS}
Tag summary
Recent tags
Content type
Image
Digest
Size
349 MB
Last updated
about 9 years ago
docker pull praqma/docker4jcasc:latest