# docker-compose 部署jenkins version: '3' services: jenkins: user: root restart: always image: jenkins/jenkins:2.383-centos7-1 container_name: jenkins ports: - 8082:8080 - 50000:50000 environment: - TZ=Asia/Shanghai - JENKINS_OPTS="--prefix=/jenkins" volumes: - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime - /etc/timezone:/etc/timezone - /root/data/jenkins/jenkins.war:/usr/share/jenkins/jenkins.war - /root/data/jenkins_home/:/var/jenkins_home - /var/run/docker.sock:/var/run/docker.sock - /usr/bin/docker:/usr/bin/docker - /usr/local/bin/docker-compose:/usr/local/bin/docker-compose - /root/data/maven-3.6.3/:/opt/maven-3.6.3 - /root/devops/applyFile/:/applyFile - /root/data/nginx/:/nginx - /root/data/brim-nginx:/brim-nginx - /root/data/ynu-nginx:/ynu-nginx - /root/data/nodejs-14.5/:/opt/nodejs-14.5 - /root/data/ansible/hosts:/etc/ansible/hosts - /root/data/ansible/ansible.cfg:/etc/ansible/ansible.cfg - /root/devops/message/:/message privileged: true ## 重启 docker-compose down docker-compose up -d
标签:compose,data,ansible,jenkins,docker,root From: https://www.cnblogs.com/wjpingok/p/17030216.html