apiVersion: apps/v1
kind: Deployment
metadata:
  name: docker-engine
  labels:
    app: docker-engine
spec:
  replicas: 1
  selector:
    matchLabels:
      app: docker-engine
  template:
    metadata:
      labels:
        app: docker-engine
    spec:
      containers:
        - name: dind
          image: docker:18.06-dind
          securityContext:
            privileged: true
          ports:
            - containerPort: 2375
          resources:
            limits:
              memory: "4096Mi"
              cpu: "4000m"
            requests:
              memory: "500Mi"
              cpu: "500m"
          volumeMounts:
            - name: dind-storage
              mountPath: /var/lib/docker
      volumes:
        - name: dind-storage
          emptyDir: {}
