Jenkins Docker 记录
实例操作用户
[143 home]# mkdir -p /home/jenkins_home [-143 home]# chown -R 1000:1000 /home/jenkins_home [-143 home]# adduser jenkins [-143 home]# chown jenkins:jenkins /home/jenkins_home [-143 home]# chmod 760 /home/jenkins_home
编辑jenkins docker-compose.yml
version: ‘2.4‘ services: kenkins: image: "jenkins/jenkins:lts" restart: always privileged: true ports: - "50000:50000" - "8080:8080" volumes: - "/home/jenkins_home:/var/jenkins_home" network_mode: "host" cpus: 1 mem_limit: 2g
创建jenkins实例 (需安装docker docker-compose)
docker-compose up -d
获取管理员密码
cat /home/jenkins_home/secrets/initialAdminPassword