Skip to content

Dockerfile and run script for Jenkins which has the ability to spin up sibling containers.

Notifications You must be signed in to change notification settings

alvinhom/jenkins-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

jenkins-docker

Dockerfile and run script for Jenkins which has the ability to spin up sibling containers. By sharing the host volumes managing docker, you share control of docker to the Jenkins container. This allows you to run docker commands from your Jenkins job which would spin up containers in the same docker where Jenkins is running.

Prerequisites

This requires docker to be running on your host. This was tested with 1.11.

How to use

  • mkdir -P /data/jenkins
  • chmod -R 777 /data/jenkins (you can change to more restrictive but jenkins user needs to be able to write to it)
  • git clone https://github.com/bfarrell/jenkins-docker
  • cd jenkins-docker
  • docker build -t myjenkins .
  • ./runJenkins
  • docker exec -it jenkins bash
    • sudo groupadd docker
    • sudo usermod -a -G docker jenkins
    • sudo chown root:docker /var/run/docker.sock

About

Dockerfile and run script for Jenkins which has the ability to spin up sibling containers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%