1.查询镜像
docker search jenkins
2.拉取镜像
docker pull jenkins/jenkins
3.启动容器
docker run -d -p 8080:8080 --name jenkins jenkins/jenkins
docker run -d -v /opt/program:/opt/program -p 8080:8080 -p 50000:50000 -v /etc/localtime:/etc/localtime --name jenkins jenkins/jenkins
4.开放端口
firewall-cmd --zone=public --permanent --add-port=8080/tcp
重新启动防火墙
systemctl restart firewalld
5.检查是否安装成功
http://localhost:8080
5.开机启动
docker update --restart=always jenkins