apiVersion: v1
kind: Pod
metadata:
  labels:
    app: php-build
spec:
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: "node-role.kubernetes.io/jenkins"
            operator: In
            values:
            - jenkins
  containers:
  - name: composer
    image: composer:1.8.0
    command:
    - cat
    tty: true
    volumeMounts:
    - mountPath: /tmp
      name: composer-home
  - name: docker
    image: docker:18.06
    command:
    - cat
    tty: true
    volumeMounts:
    - mountPath: /var/run/docker.sock
      name: docker-sock
    - mountPath: "/root/.docker"
      name: docker-push-config
  volumes:
  - name: docker-sock
    hostPath:
      path: /var/run/docker.sock
  - name: docker-push-config
    secret:
      secretName: regcred
      items:
      - key: .dockerconfigjson
        path: config.json
  - name: composer-home
    hostPath:
      path: /data/composer-cache
      type: Directory
