Skip to content

Instantly share code, notes, and snippets.

@danielalejandrohc
Created January 15, 2020 02:23
Show Gist options
  • Save danielalejandrohc/fd03c7d1383347422cbd61dfa5fc1616 to your computer and use it in GitHub Desktop.
Save danielalejandrohc/fd03c7d1383347422cbd61dfa5fc1616 to your computer and use it in GitHub Desktop.
FROM jenkins/jenkins:2.204.1-jdk11
# This will skip the wizard UI configuration so you can use Jenkins straight.
ENV JAVA_OPTS=-Djenkins.install.runSetupWizard=false
# This will install the plugins from "plugins.txt"
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/plugins.txt
# This will copy the Configuration as Code file - init.groovy:/var/jenkins_home/init.groovy.d/init.groovy
# Notice that this is used in conjunction with the enviroment variable CASC_JENKINS_CONFIG defined in docker-compose file
COPY jcasc.yaml /var/jenkins_home/casc_configs/jcasc.yaml
# Copy startup groovy script
COPY init.groovy /var/jenkins_home/init.groovy.d/init.groovy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment