Skip to content

emad-elsaid/jenkins-docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JENKINS

This repo contains a docker-compose file that starts a jenkins container and a jenkins slave contains secured in a docker-compose network

USAGE

  1. clone this repo
  2. install docker and docker-compose if you don't have them
  3. run docker-compose build to build both master and slave images
  4. run docker-compnse run to run both containers at the same time
  5. access jenkins from your browser localhost:8080
  6. the password jenkins asks for should appear in your terminal while the container is starting

Adding the slave node

Go to http://localhost:8080/computer/ add "new node", the slave username and password are jenkins, use ssh to connect with these credentials, and choose not to verify the Host key, the ssh host is simply slave.

Also go to the master slave http://localhost:8080/computer/(master)/configure and choose usage "only build jobs with label expressions matching this node" to use the slave to execute your jobs.

Note

if you turned off the containers all data related to the master will be saved in a docker volume, slave will be resetted, that's useful if things went south on the slave and you want to reset it, execute docker-compose down then run the cotainers again.

About

A setup to run jenkins with docker compose

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published