version: '2'
services:

  jenkins:
    hostname: jenkins
    image: jenkinsci/blueocean
    ports:
      - '8080:8080'
      - '50000:50000'
    privileged: true
    volumes:
        # enable persistent volume (warning: make sure that the local jenkins_home folder is created)
        - '../volume/jenkins_data:/var/jenkins_home'
        - '/var/run/docker.sock:/var/run/docker.sock'
    restart: always
volumes:
  jenkins_data: