Skip to content

Commit

Permalink
Use Jenkins base image to avoid workaround for Docker packaging limit…
Browse files Browse the repository at this point in the history
…ations
  • Loading branch information
oleg-nenashev committed Aug 5, 2019
1 parent 45f6cc4 commit f05ece5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 212 deletions.
31 changes: 8 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
FROM jenkins/jenkins:2.176.2 as install_scripts_source
FROM cloudbees/cloudbees-jenkins-distribution:2.176.2.3 as war_source

FROM cloudbees/cloudbees-jenkins-distribution:2.176.2.3
COPY --from=install_scripts_source /usr/local/bin/jenkins-support /usr/local/bin/jenkins-support
COPY --from=install_scripts_source /usr/local/bin/install-plugins.sh /usr/local/bin/install-plugins.sh

ENV JENKINS_UC http://jenkins-updates.cloudbees.com
ENV JENKINS_INCREMENTALS_REPO_MIRROR https://repo.jenkins-ci.org/incrementals

# Workaround https://github.com/jenkinsci/docker/issues/857
USER root
RUN mkdir -p /usr/share/jenkins/ && ln -s /usr/share/cloudbees-jenkins-distribution/cloudbees-jenkins-distribution.war /usr/share/jenkins/jenkins.war
USER cloudbees-jenkins-distribution
FROM jenkins/jenkins:2.176.2
COPY --from=war_source /usr/share/cloudbees-jenkins-distribution/cloudbees-jenkins-distribution.war /usr/share/jenkins/jenkins.war

# Startup all plugins included into the CloudBees Jenkins Distribution bundle
ENV JAVA_OPTS "-Dcom.cloudbees.jenkins.cjp.installmanager.CJPPluginManager.allRequired=true"

# Install extra plugins
# REF_ROOT is consumed by jenkins-support in the https://github.com/jenkinsci/docker/issues/861 workaround
ENV REF_ROOT=/usr/share/cloudbees-jenkins-distribution/ref
ENV REF=${REF_ROOT}/plugins
COPY plugins.txt /usr/share/cloudbees-jenkins-distribution/ref/plugins.txt
RUN bash /usr/local/bin/install-plugins.sh < /usr/share/cloudbees-jenkins-distribution/ref/plugins.txt
# Install additional plugins including JCasC
ENV JENKINS_UC http://jenkins-updates.cloudbees.com
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN bash /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt

# Apply JCasC
# Apply JCasC configuration
COPY jenkins.yaml /cfg/jenkins.yaml
ENV CASC_JENKINS_CONFIG /cfg/jenkins.yaml

# Temporary override for jenkins-support to support custom ref-roots there
# TODO: remove once https://github.com/jenkinsci/docker/issues/861 is fixed
COPY jenkins-support /usr/local/bin/jenkins-support
189 changes: 0 additions & 189 deletions jenkins-support

This file was deleted.

0 comments on commit f05ece5

Please sign in to comment.