---
apiVersion: v1
kind: Pod
metadata:
  name: docker-build-pod
spec:
  serviceAccountName: jenkins
  containers:
    - name: build
      image: vitalbeats/aws-docker-builder:1.0.0
      tty: true
      command:
        - cat
      securityContext:
        privileged: true
      volumeMounts:
        - name: dockersocket
          mountPath: /var/run/docker.sock
        - name: dockercfg
          mountPath: /root/.docker
          readOnly: true
  volumes:
    - name: dockersocket
      hostPath:
        path: /var/run/docker.sock
    - name: dockercfg
      secret:
        secretName: internal-registry
        items:
          - key: .dockerconfigjson
            path: config.json
