playground/docker-jenkins/readme.txt

23 lines
903 B
Plaintext
Raw Normal View History

2021-08-25 15:12:35 +00:00
pull the jenkins lts image.
# docker pull jenkins/jenkins:lts
start a jenkins container.
# mkdir -p ${HOME}/data/jenkins_1_home
# docker run -p 8081:8080 --name jenkins-1 --restart=unless-stopped -d -i -t -v ${HOME}/data/jenkins_1_home:/var/jenkins_home jenkins/jenkins:lts
instead of mapping to a specific directory, make may to a named volume.
# docker run -p 8081:8080 --name jenkins-1 -v jenkins_1_home:/var/jenkins_home jenkins/jenkins:lts
# docker volume create jenkins_1_home
# docker volume ls
# docker volume inspect jenkins_1_home
## on some other build machines, you may create agent images and run them
make centos6-jenkins
docker run -d -p 9922:22 --name=debian-jenkins-agent --restart=unless-stopped debian-jenkins:latest /usr/sbin/sshd -D
2021-08-25 15:12:35 +00:00
make debian-jenkins
docker run -d -p 9923:22 --name=centos6-jenkins-agent --restart=unless-stopped centos6-jenkins:latest /usr/sbin/sshd -D