services:
  jenkins:
    privileged: true
    user: root
    ports:
      - 8001:8080
      - 50000:50000
    container_name: jenkins
    volumes:
      - ./jenkins_home:/var/jenkins_home
      - /var/run/docker.sock:/var/run/docker.sock
#      - /root/.kube/config:/var/jenkins_home/.kube/config:ro   # ← kubeconfig
#      - /usr/bin/kubectl:/usr/bin/kubectl:ro                    # ← binaire kubectl
    environment:
      - JAVA_OPTS=-Xms512m -Xmx2048m
#      - KUBECONFIG=/var/jenkins_home/.kube/config               # ← variable env
    build:
      context: ./config/
      dockerfile: Dockerfile
