turnbullpress / dockerbook-code

The code and configuration examples from The Docker Book (http://www.dockerbook.com)
929 stars 580 forks source link

Jenkins does not build proper, missing GIT plugin #28

Closed tobernguyen closed 8 years ago

tobernguyen commented 8 years ago

Hi,

I just follow your latest Docker file at https://github.com/jamtur01/dockerbook-code/blob/master/code/5/jenkins/Dockerfile

FROM jenkins
MAINTAINER james@example.com
ENV REFRESHED_AT 2016-06-01

USER root
RUN wget http://get.docker.com/builds/Linux/x86_64/docker-latest.tgz
RUN tar -xvzf docker-latest.tgz
RUN mv docker/* /usr/bin/

USER jenkins
COPY plugins.txt /usr/share/jenkins/ref/
RUN /usr/local/bin/plugins.sh /usr/share/jenkins/ref/plugins.txt

But on step Create a new Jenkins job, I couldn't find the GIT option in Source code management section. I tried to read the log from Docker when starting jenkins container and I found this line:

SEVERE: Failed to install git: One or more dependencies could not be resolved for git : scm-api (1.0)

It seems that your setup is failed to install the GIT plugin. There is also known issue in here: https://issues.jenkins-ci.org/browse/JENKINS-30361

Any help?

jamtur01 commented 8 years ago

Just add scm-api to plugins.txt. Thanks for letting me know.