美文网首页
3.docker 运行 jenkins

3.docker 运行 jenkins

作者: 爱工作的java程序猿 | 来源:发表于2020-07-15 12:44 被阅读0次

参考

https://hub.docker.com/_/jenkins?tab=description

https://hub.docker.com/r/jenkins/jenkins/tags

https://github.com/jenkinsci/docker/blob/master/README.md

启动 jenkins

docker-compose 内容

tee docker-compose.yaml <<-'EOF'
version: '3.3'
services:
  jenkins:
    restart: always
    image: jenkins/jenkins:2.244-jdk11
    #image: jenkins/jenkins:2.245-alpine
    #image:  jenkins/jenkins:2.235.2-lts-centos7
    user: root
    volumes:
     - /docker-data/jenkins_home:/var/jenkins_home
     - /var/run/docker.sock:/var/run/docker.sock
     - /usr/bin/docker:/usr/bin/docker
     - /usr/bin/docker-compose:/usr/bin/docker-compose
     - $HOME/.gradle:/home/gradle/.gradle
    ports:
     - "80:8080"
     - "50000:50000"
EOF

插件加速

sed -i 's/http:\/\/updates.jenkins-ci.org\/download/https:\/\/mirrors.tuna.tsinghua.edu.cn\/jenkins/g' default.json && sed -i 's/http:\/\/www.google.com/https:\/\/www.baidu.com/g' default.json

修改 maven settings.xml

/docker-data/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven/conf/settings.xml

相关文章

网友评论

      本文标题:3.docker 运行 jenkins

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