Docker Community Forums

Share and learn in the Docker community.

Jenkins Dockerfile fails during the build

dockerhub
docker

(Prasanna21) #1

I’m using jenkins dockerfile for our project purpose. While building the image, we are getting the error in plugins.sh script file. Jenkins latest version dockerfile we used.

FROM jenkins:latest

USER root
RUN apt-get update
&& apt-get install -y sudo
&& rm -rf /var/lib/apt/lists/*
RUN echo “jenkins ALL=NOPASSWD: ALL” >> /etc/sudoers

USER jenkins
COPY hudson.plugins.msbuild.MsBuildBuilder.xml /var/jenkins_home
COPY hudson.plugins.sonar.SonarPublisher.xml /var/jenkins_home
COPY hudson.plugins.sonar.SonarRunnerInstallation.xml /var/jenkins_home
COPY org.jenkinsci.plugins.MsTestBuilder.xml /var/jenkins_home
COPY plugins.txt /usr/share/jenkins/plugins.txt

RUN mkdir -p /var/jenkins_home/Utilities
ADD JenkinsPlugin /var/jenkins_home/Utilities/

RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt

Plugins.txt:

nt:1.2
subversion:1.54
token-macro:1.10
build-name-setter:1.0
clover:4.4.0
email-ext:2.25
envinject:1.89
fail-the-build-plugin:1.0
htmlpublisher:1.3
jenkins-multijob-plugin:1.7
msbuild:1.21
mstest:0.7
mstestrunner:1.2.0
scripttrigger:0.31
sonar:2.1
svn-revert-plugin:1.3
text-finder:1.10
versionnumber:1.4
cobertura:1.9.7
FindBugs:4.63
checkstyle:3.44

Kindly help us to build the docker container.