instruction: Create a Dockerfile for workloads
output: ```dockerfile
  from
  being counted towards the .spec.backoffLimit limit of retries.
  
  Note: If the Job failed, either by the Pod failure policy or Pod backoff
  failure policy, and the Job is running multiple Pods, Kubernetes terminates all
  the Pods in that Job that are still Pending or Running.
  
  These are some requirements and semantics of the API:
  
  if you want to use a .spec.podFailurePolicy field for a Job, you must
  also define that Job's pod template with .spec.restartPolicy set to Never.
  the Pod failure policy rules you specify under spec.podFailurePolicy.rules
  are evaluated in order. Once a rule matches a Pod failure, the remaining rules
  are ignored. When no rule matches the Pod failure, the default
  handling applies.
  you may want to restrict a rule to a specific container by specifying its name
  inspec.podFailurePolicy.rules[*].onExitCodes.containerName. When not specified the rule
  applies to all containers. When specified, it should match one the container
  or initContainer names in the Pod template.
  you may specify the action taken when a Pod failure policy is matched by
  spec.podFailurePolicy.rules[*].action. Possible values are:
  
  FailJob: use to indicate that the Pod's job should be marked as Failed and
  all running Pods should be terminated.
  Ignore: use to indicate that the counter towards the .spec.backoffLimit
  should not be incremented and a replacement Pod should be created.
  Count: use to indicate that the Pod should be handled in the default way.
  The counter towards the .spec.backoffLimit should be incremented.
  FailIndex: use this action along with backoff limit per index
  to avoid unnecessary retries within the index of a failed pod.
  
  Note: When you use a podFailurePolicy, the job controller only matches Pods in the
  Failed phase. Pods with a deletion timestamp that are not in a terminal phase
  (Failed or Succeeded) are considered still terminating. This implies that
  terminating pods retain a tracking finalizer
  until they reach a terminal phase.
  Since Kubernetes 1.27, Kubelet transitions deleted pods to a terminal phase
  (see: Pod Phase). This
  ensures that deleted pods have their finalizers removed by the Job controller.
  
  Note: Starting with Kubernetes v1.28, when Pod failure policy is used, the Job controller recreates
  terminating Pods only once these Pods reach the terminal Failed phase. This behavior is similar
  to podReplacementPolicy: Failed. For more information, see Pod replacement policy.
  
  Job termination and cleanup
  When a Job completes, no more Pods are created, but the Pods are usually not deleted either.
  Keeping them around allows you to still view the logs of completed pods to check for errors, warnings, or other diagnostic output.
  The job object also remains after it is completed so that you can view its status. It is up to the user to delete
  old jobs after noting their status. Delete the job with kubectl (e.g. kubectl delete jobs/pi or kubectl delete -f ./job.yaml).
  When you delete the job using kubectl, all the pods it created are deleted too.
  By default, a Job will run uninterrupted unless a Pod fails (restartPolicy=Never)
  or a Container exits in error (restartPolicy=OnFailure), at which point the Job defers to the
  .spec.backoffLimit described above. Once .spec.backoffLimit has been reached the Job will
  be marked as failed and any running Pods will be terminated.
  Another way to terminate a Job is by setting an active deadline.
  Do this by setting the .spec.activeDeadlineSeconds field of the Job to a number of seconds.
  The activeDeadlineSeconds applies to the duration of the job, no matter how many Pods are created.
  Once a Job reaches activeDeadlineSeconds, all of its running Pods are terminated and the Job status
  will become type: Failed with reason: DeadlineExceeded.
  Note that a Job's .spec.activeDeadlineSeconds takes precedence over its .spec.backoffLimit.
  Therefore, a Job that is retrying one or more failed Pods will not deploy additional Pods once
  it reaches the time limit specified by activeDeadlineSeconds, even if the backoffLimit is not yet reached.
  Example:
  apiVersion: batch/v1
  kind: Job
  metadata:
   name: pi-with-timeout
  spec:
   backoffLimit: 5
   activeDeadlineSeconds: 100
   template:
   spec:
   containers:
   - name: pi
   image: perl:5.34.0
   command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
   restartPolicy: Never
  Note that both the Job spec and the Pod template spec
  within the Job have an activeDeadlineSeconds field. Ensure that you set this field at the proper level.
  Keep in mind that the restartPolicy applies to the Pod, and not to the Job itself:
  there is no automatic Job restart once the Job status is type: Failed.
  That is, the Job termination mechanisms activated with .spec.activeDeadlineSeconds
  and .spec.backoffLimit result in a permanent Job failure that requires manual intervention to resolve.
  Clean up finished jobs automatically
  Finished Jobs are usually no longer needed in the system. Keeping them around in
  the system will put pressure on the API server. If the Jobs are managed directly
  by a higher level controller, such as
  CronJobs, the Jobs can be
  cleaned up by CronJobs based on the specified capacity-based cleanup policy.
  TTL mechanism for finished Jobs
  
  FEATURE STATE: Kubernetes v1.23 [stable]
  
  Another way to clean up finished Jobs (either Complete or Failed)
  automatically is to use a TTL mechanism provided by a
  TTL controller for
  finished resources, by specifying the .spec.ttlSecondsAfterFinished field of
  the Job.
  When the TTL controller cleans up the Job, it will delete the Job cascadingly,
  i.e. delete its dependent objects, such as Pods, together with the Job. Note
  that when the Job is deleted, its lifecycle guarantees, such as finalizers, will
  be honored.
  For example:
  apiVersion: batch/v1
  kind: Job
  metadata:
   name: pi-with-ttl
  spec:
   ttlSecondsAfterFinished: 100
   template:
   spec:
   containers:
   - name: pi
   image: perl:5.34.0
   command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
   restartPolicy: Never
  The Job pi-with-ttl will be eligible to be automatically deleted, 100
  seconds after it finishes.
  If the field is set to 0, the Job will be eligible to be automatically deleted
  immediately after it finishes. If the field is unset, this Job won't be cleaned
  up by the TTL controller after it finishes.
  
  Note: It is recommended to set ttlSecondsAfterFinished field because unmanaged jobs
  (Jobs that you created directly, and not indirectly through other workload APIs
  such as CronJob) have a default deletion
  policy of orphanDependents causing Pods created by an unmanaged Job to be left around
  after that Job is fully deleted.
  Even though the control plane eventually
  garbage collects
  the Pods
  ```