利用docker快速部署jenkins
curl -sL 'http://iso.sqlfans.cn/docker/install_docker_2401.sh' | bash
curl -sL 'http://iso.sqlfans.cn/docker/install_docker_compose_2181.sh' | bash
docker-compose --version
docker pull jenkins/jenkins:lts
mkdir -p /data/docker/jenkins
chmod 777 -R /data/docker/jenkins
docker run -itd -p 8080:8080 -p 50000:50000 --privileged=true -v /data/docker/jenkins/:/var/jenkins_home -v /etc/localtime:/etc/localtime --name jenkins jenkins/jenkins:lts
docker ps -a
- 第3步,登录控制台,将
127.0.0.1
改为实际的ip地址
地址:http://127.0.0.1:8080
账号:root
初始密码:docker exec -it jenkins /bin/bash -c 'cat /var/jenkins_home/secrets/initialAdminPassword'
重置密码:Admin_147
docker stop jenkins
docker rm jenkins
docker rmi -f $(docker images | grep "jenkins" | awk '{print $3}')
rm -rf /data/docker/jenkins