---
apiVersion: batch/v1
kind: CronJob
metadata:
  name: cron-docker-volume
spec:
  schedule: "*/5 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: busybox
            image: public.ecr.aws/docker/library/busybox:latest
            imagePullPolicy: IfNotPresent
            command:
            - /bin/sh
            - -c
            - sleep 300s
            volumeMounts:
            - name: dockersock
              mountPath: "/var/run/docker.sock"
          restartPolicy: OnFailure
          volumes:
          - name: dockersock
            hostPath:
              path: /var/run/docker.sock
  