Last active
May 7, 2020 21:32
-
-
Save abola/a15461d1717766effe24823786f72110 to your computer and use it in GitHub Desktop.
Install Jenkins with docker on CentOS 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
JENKINS_VERSION="2.0-rc-1" | |
### | |
# Automatic install docker with script | |
# @see <a href="https://docs.docker.com/engine/installation/linux/centos/">Installation on CentOS</a> | |
## | |
curl -fsSL https://get.docker.com/ | sh | |
# start docker.service | |
systemctl start docker | |
# pull jenkins image | |
docker pull jenkinsci/jenkins:$JENKINS_VERSION | |
# local jenkins home | |
mkdir -p /var/jenkins | |
chown 1000 /var/jenkins | |
# start jenkins as deamon | |
docker run -d -p 8080:8080 -p 50000:50000 -v /var/jenkins:/var/jenkins_home jenkinsci/jenkins:$JENKINS_VERSION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment