version: "3" services: jenkins: build: context: ./image container_name: jenkins image: jenkins hostname: jenkins restart: always volumes: - jenkins_home:/var/jenkins_home - /var/run/docker.sock:/var/run/docker.sock - /usr/bin/docker:/usr/bin/docker ports: - 2023:8080 logging: driver: json-file options: max-size: "50m" max-file: "10" volumes: jenkins_home: driver: local