美文网首页
Docker Compose安装jenkins

Docker Compose安装jenkins

作者: 请叫我比比比巴卜 | 来源:发表于2021-10-27 14:08 被阅读0次
    创建docker-compose文件,docker-compose-jenkins.yml
    version: '2'
    services:
        jenkins:
         image: 'jenkinsci/blueocean'
         container_name: jenkins
         privileged: true
         restart: always
         ports:
             - '3389:8080'
             - '50000:50000'
         volumes:
             - '/root/jenkins/jenkins_home:/var/jenkins_home'
         restart: always
         mem_limits: 2G
    
    创建jenkins_home文件夹,并且添加权限
    chown -R 1000:1000 /root/jenkins/jenkins_home
    
    启动jenkins
    docker-compose -f docker-compose-jenkins.yml up -d 
    
    查看初始化密码
    cat /root/jenkins/jenkins_home/secrets/initialAdminPassword
    

    相关文章

      网友评论

          本文标题:Docker Compose安装jenkins

          本文链接:https://www.haomeiwen.com/subject/neoualtx.html