version: '2.2'
services:
  jenkins:
    init: true
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - 8080:8080

version: '2.2'
volumes:
  jenkins-data:
services:
  jenkins:
    init: true
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - 8080:8080
    volumes:
      - 'jenkins-data:/var/lib/jenkins'

Support persisting Jenkins data in docker
Support persisting Jenkins data in docker
