apiVersion: v1
kind: Pod
metadata:
  labels:
    app: jenkins
    type: agent
spec:
  containers:
  - name: jnlp
    env:
    - name: CONTAINER_ENV_VAR
      value: jnlp
    tty: true
  - name: busybox
    image: busybox
    command:
    - cat
    tty: true
  - name: docker
    image: docker:19.03.1
    command: ['sleep', '99d']
    env:
      - name: DOCKER_HOST
        value: tcp://localhost:2375
  - name: docker-daemon
    image: docker:19.03.1-dind
    env:
    - name: DOCKER_TLS_CERTDIR
      value: ""
    securityContext:
      privileged: true
    volumeMounts:
        - name: cache
          mountPath: /var/lib/docker
  - name: maven
    image: maven:3.3.9-jdk-8-alpine
    command:
    - cat
    tty: true
  volumes:
    - name: cache
      hostPath:
        path: /tmp
        type: Directory