docker-compose部署jenkins

version: '3.1'
services:
  jenkins:
    image: jenkins/jenkins:lts
    volumes:
      - /docker/jenkins/jenkins:/var/jenkins_home
      - /docker/jenkins/docker.sock:/var/run/docker.sock
      - /docker/jenkins/docker:/usr/bin/docker
      - /docker/jenkins/lib:/usr/lib/x86_64-linux-gnu/libltdl.so.7
    ports:
      - "9090:8080"
    expose:
      - "9090"
      - "50000"
    privileged: true
    user: root
    restart: always
    container_name: jenkins
    environment:
      JAVA_OPTS: '-Djava.util.logging.config.file=/var/jenkins_home/log.properties'

 

posted @ 2021-04-28 18:14  扰扰  阅读(379)  评论(0编辑  收藏  举报