从0到1——2、docker-compose安装jenkins

1、安装docker-compose

curl -L https://get.daocloud.io/docker/compose/releases/download/1.12.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

chmod +x /usr/local/bin/docker-compose

2、配置文件

version: "3"
services:
  jenkins:
    container_name: jenkins
    image: jenkins/jenkins:lts
    restart: always
    environment:
      - TZ=Asia/Shanghai
    ports:
      - "8070:8080"
      - "50000:50000"
    volumes:
      - /docker/jenkins/jenkins_home:/var/jenkins_home
      - /docker/jenkins/run/docker.sock:/var/run/docker.sock
      - /docker/jenkins/bin/docker:/usr/bin/docker
      - /docker/jenkins/data/maven:/usr/local/maven
    privileged: true
    user: root

上一篇:jenkins配置及使用


下一篇:Python学习笔记(十二)—Python3中pip包管理工具的安装【转】