instruction: Create a comprehensive Dockerfile for cluster applications with best practices
output: ```dockerfile
  from the original shutdown node so the volumes
  used by these pods cannot be attached to a new running node. As a result, the
  application running on the StatefulSet cannot function properly. If the original
  shutdown node comes up, the pods will be deleted by kubelet and new pods will be
  created on a different running node. If the original shutdown node does not come up,
  these pods will be stuck in terminating status on the shutdown node forever.
  To mitigate the above situation, a user can manually add the taint node.kubernetes.io/out-of-service
  with either NoExecute or NoSchedule effect to a Node marking it out-of-service.
  If the NodeOutOfServiceVolumeDetachfeature gate
  is enabled on kube-controller-manager,
  and a Node is marked out-of-service with this taint, the pods on the node will be forcefully deleted
  if there are no matching tolerations on it and volume detach operations for the pods terminating on
  the node will happen immediately. This allows the Pods on the out-of-service node to recover quickly
  on a different node.
  During a non-graceful shutdown, Pods are terminated in the two phases:
  
  Force delete the Pods that do not have matching out-of-service tolerations.
  Immediately perform detach volume operation for such pods.
  
  Note:
  Before adding the taint node.kubernetes.io/out-of-service, it should be verified
  that the node is already in shutdown or power off state (not in the middle of restarting).
  The user is required to manually remove the out-of-service taint after the pods are
  moved to a new node and the user has checked that the shutdown node has been
  recovered since the user was the one who originally added the taint.
  
  Swap memory management
  
  FEATURE STATE: Kubernetes v1.28 [beta]
  
  To enable swap on a node, the NodeSwap feature gate must be enabled on
  the kubelet, and the --fail-swap-on command line flag or failSwapOn
  configuration setting
  must be set to false.
  
  Warning: When the memory swap feature is turned on, Kubernetes data such as the content
  of Secret objects that were written to tmpfs now could be swapped to disk.
  
  A user can also optionally configure memorySwap.swapBehavior in order to
  specify how a node will use swap memory. For example,
  memorySwap:
   swapBehavior: UnlimitedSwap
  
  UnlimitedSwap (default): Kubernetes workloads can use as much swap memory as they
  request, up to the system limit.
  LimitedSwap: The utilization of swap memory by Kubernetes workloads is subject to limitations.
  Only Pods of Burstable QoS are permitted to employ swap.
  
  If configuration for memorySwap is not specified and the feature gate is
  enabled, by default the kubelet will apply the same behaviour as the
  UnlimitedSwap setting.
  With LimitedSwap, Pods that do not fall under the Burstable QoS classification (i.e.
  BestEffort/Guaranteed Qos Pods) are prohibited
  ```