安装 docker
bash
#安装 软件包 docker
yum install -y yum-utils device-mapper-persistent-data lvm2
#设置 yum 源
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
#查看版本
#yum list docker-ce --showduplicates | sort -r
#安装最新稳定版
yum install docker-ce
#起动
systemctl start docker
#设置自启动
systemctl enable docker
jenkins
bash
docker run \
-u root \
-d \
-p 8080:8080 \
-p 50000:50000 \
-v jenkins-data:/var/jenkins_home \
-v /var/run/docker.sock:/var/run/docker.sock \
jenkinsci/blueocean:1.25.7