由于是基于 Docker 安装 Jenkins,因此,你的环境上必须要安装好 Dokcer,并配置好加速器,不然下载镜像速度可能会比较慢。怎么安装,可以参考如下文章:
docker run / -u root / --name devops-jenkins / -d / -p 8080:8080 / -p 50000:50000 / -v /data/docker_local/jenkins-data:/var/jenkins_home / -v /var/run/docker.sock:/var/run/docker.sock / jenkinsci/blueocean:1.15.1
version: "3" services: jenkins: image: jenkinsci/blueocean:1.15.1 container_name: devops-jenkins # 容器名 user: root restart: always ports: - "8080:8080" - "50000:50000" volumes: - "/data/docker_local/jenkins-data:/var/jenkins_home" - "/var/run/docker.sock:/var/run/docker.sock"