Docker - Jenkins Image

181 views Asked by At

I am building jenkins slave using docker image.

Need to install git on to the docker image. How can i do that.

Is there any docker image for git that can be used.

thanks

3

There are 3 answers

1
Avinash On
$ docker search jenkins | grep git
stephenreed/jenkins-java8-maven-git   Automated build that provides a continuous...   52                   [OK]
0
VonC On

If there is none, you can quickly build one with a small base image (like Alpine), and a directive like:

# Install Git
RUN apt-get install git-core --assume-yes
0
Erich On

I've created a simple docker image that comes packaged with Jenkins, Java8, Git, Maven and NodeJS. This covers most use cases so you don't have to keep making new Jenkins images every week.

Jenkins + Docker Image

And the relevant github for source code