apiVersion: v1
kind: Pod
spec:
  containers:
    - name: maven
      image: maven:3.6-jdk-13
      command:
        - cat
      tty: true
      volumeMounts:
        - name: maven-settings
          mountPath: /root/.m2
        - name: maven-repository
          mountPath: /root/.m2/repository
        - name: dependency-check
          mountPath: /root/dependency-check
        - name: docker-certs
          mountPath: /certs/client
          subPath: client
    - name: docker
      securityContext:
        privileged: true
      image: docker:dind
      tty: true
      env:
        - name: DOCKER_TLS_CERTDIR
          value: /certs
      volumeMounts:
        - name: docker-certs
          mountPath: /certs
        - name: docker-daemon
          mountPath: /etc/docker/daemon.json
          subPath: daemon.json
  volumes:
    - name: maven-settings
      secret:
        secretName: maven-settings
    - name: maven-repository
      persistentVolumeClaim:
        claimName: maven-repository
    - name: dependency-check
      persistentVolumeClaim:
        claimName: dependency-check
    - name: docker-certs
      emptyDir: {}
    - name: docker-daemon
      configMap:
        name: docker-daemon-json