docker 版 jenkins运行

Posted heling

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker 版 jenkins运行相关的知识,希望对你有一定的参考价值。

直接通过 docker命令运行:

docker run -d -p 31980:8080 -p 31900:50000 -v /docker-image-slave-registry/image/registry2/jenkins:/var/jenkins_home  -v /etc/localtime:/etc/localtime   --privileged=true  jenkins

通过marathon运行(有目前问题)


  "id": "jenkins",
  "cmd": null,
  "cpus": 1,
  "mem": 256,
  "disk": 0,
  "instances": 1,
  "container": 
    "docker": 
      "image": "jenkins", 
      "privileged": true,
      "forcePullImage": false
    ,
    "type": "DOCKER",
    "portMappings": [
      
        "containerPort": 50000,
                "hostPort": 31900,
                "servicePort": 0,
        "protocol": "tcp",
        "name": "jenkins50000",
        "labels": null
      ,
      
        "containerPort": 8080,
                "hostPort": 31980,
                "servicePort": 0,
        "protocol": "tcp",
        "name": "jenkins8080",
        "labels": null
      
    ],
    "volumes": [
        
        "containerPath": "/var/jenkins_home",
        "mode": "RW",
                "hostPath": "/docker-image-slave-registry/image/registry2/jenkins" 
    ,
        "containerPath": "/etc/localtime",
        "mode": "RW",
                "hostPath": "/etc/localtime" 
    ]
  ,
  "networks": [
    
      "mode": "container/bridge"
    
  ],
  "env": ,
  "labels": ,
  "constraints": [["hostname", "CLUSTER", "192.168.1.153"]],
  "healthChecks": []

 

以上是关于docker 版 jenkins运行的主要内容,如果未能解决你的问题,请参考以下文章

Docker安装Jenkins打包Maven项目为Docker镜像并运行保姆级图文教学

jenkins+docker+docker-compose完整发版流程

Jenkins+Docker自动化集成环境搭

jenkins容器中使用docker

基于jenkins+docker+git 持续化自动部署项目(详细版一));

ubuntu 中安装jenkins,基于docker运行jenkins