instruction: Create a Dockerfile for Nginx, Node.js with production best practices
output: ```dockerfile
  from a Pod
  
  Run Jobs
  
  Running Automated Tasks with a CronJob
  
  Coarse Parallel Processing Using a Work Queue
  
  Fine Parallel Processing Using a Work Queue
  
  Indexed Job for Parallel Processing with Static Work Assignment
  
  Job with Pod-to-Pod Communication
  
  Parallel Processing using Expansions
  
  Handling retriable and non-retriable pod failures with Pod failure policy
  
  Access Applications in a Cluster
  
  Deploy and Access the Kubernetes Dashboard
  
  Accessing Clusters
  
  Configure Access to Multiple Clusters
  
  Use Port Forwarding to Access Applications in a Cluster
  
  Use a Service to Access an Application in a Cluster
  
  Connect a Frontend to a Backend Using Services
  
  Create an External Load Balancer
  
  List All Container Images Running in a Cluster
  
  Set up Ingress on Minikube with the NGINX Ingress Controller
  
  Communicate Between Containers in the Same Pod Using a Shared Volume
  
  Configure DNS for a Cluster
  
  Access Services Running on Clusters
  
  Extend Kubernetes
  
  Configure the Aggregation Layer
  
  Use Custom Resources
  
  Extend the Kubernetes API with CustomResourceDefinitions
  
  Versions in CustomResourceDefinitions
  
  Set up an Extension API Server
  
  Configure Multiple Schedulers
  
  Use an HTTP Proxy to Access the Kubernetes API
  
  Use a SOCKS5 Proxy to Access the Kubernetes API
  
  Set up Konnectivity service
  
  TLS
  
  Configure Certificate Rotation for the Kubelet
  
  Manage TLS Certificates in a Cluster
  
  Manual Rotation of CA Certificates
  
  Manage Cluster Daemons
  
  Perform a Rolling Update on a DaemonSet
  
  Perform a Rollback on a DaemonSet
  
  Running Pods on Only Some Nodes
  
  Networking
  
  Adding entries to Pod /etc/hosts with HostAliases
  
  Extend Service IP Ranges
  
  Validate IPv4/IPv6 dual-stack
  
  Extend kubectl with plugins
  
  Manage HugePages
  
  Schedule GPUs
  
  Tutorials
  
  Hello Minikube
  
  Learn Kubernetes Basics
  
  Create a Cluster
  
  Using Minikube to Create a Cluster
  
  Deploy an App
  
  Using kubectl to Create a Deployment
  
  Explore Your App
  
  Viewing Pods and Nodes
  
  Expose Your App Publicly
  
  Using a Service to Expose Your App
  
  Scale Your App
  
  Running Multiple Instances of Your App
  
  Update Your App
  
  Performing a Rolling Update
  
  Configuration
  
  Example: Configuring a Java Microservice
  
  Externalizing config using MicroProfile, ConfigMaps and Secrets
  
  Updating Configuration via a ConfigMap
  
  Configuring Redis using a ConfigMap
  
  Security
  
  Apply Pod Security Standards at the Cluster Level
  
  Apply Pod Security Standards at the Namespace Level
  
  Restrict a Container's Access to Resources with AppArmor
  
  Restrict a Container's Syscalls with seccomp
  
  Stateless Applications
  
  Exposing an External IP Address to Access an Application in a Cluster
  
  Example: Deploying PHP Guestbook application with Redis
  
  Stateful Applications
  
  StatefulSet Basics
  
  Example: Deploying WordPress and MySQL with Persistent Volumes
  
  Example: Deploying Cassandra with a StatefulSet
  
  Running ZooKeeper, A Distributed System Coordinator
  
  Services
  
  Connecting Applications with Services
  
  Using Source IP
  
  Explore Termination Behavior for Pods And Their Endpoints
  
  Reference
  
  Glossary
  
  API Overview
  
  Kubernetes API Concepts
  
  Server-Side Apply
  
  Client Libraries
  
  Common Expression Language in Kubernetes
  
  Kubernetes Deprecation Policy
  
  Deprecated API Migration Guide
  
  Kubernetes API health endpoints
  
  API Access Control
  
  Authenticating
  
  Authenticating with Bootstrap Tokens
  
  Authorization
  
  Using RBAC Authorization
  
  Using Node Authorization
  
  Webhook Mode
  
  Using ABAC Authorization
  
  Admission Controllers
  
  Dynamic Admission Control
  
  Managing Service Accounts
  
  Certificates and Certificate Signing Requests
  
  Mapping PodSecurityPolicies to Pod Security Standards
  
  Kubelet authentication/authorization
  
  TLS bootstrapping
  
  Validating Admission Policy
  
  Well-Known Labels, Annotations and Taints
  
  Audit Annotations
  
  Kubernetes API
  
  Workload Resources
  
  Pod
  
  PodTemplate
  
  ReplicationController
  
  ReplicaSet
  
  Deployment
  
  StatefulSet
  
  ControllerRevision
  
  DaemonSet
  
  Job
  
  CronJob
  
  HorizontalPodAutoscaler
  
  HorizontalPodAutoscaler
  
  PriorityClass
  
  PodSchedulingContext v1alpha2
  
  ResourceClaim v1alpha2
  
  ResourceClaimTemplate v1alpha2
  
  ResourceClass v1alpha2
  
  Service Resources
  
  Service
  
  Endpoints
  
  EndpointSlice
  
  Ingress
  
  IngressClass
  
  Config and Storage Resources
  
  ConfigMap
  
  Secret
  
  Volume
  
  PersistentVolumeClaim
  
  PersistentVolume
  
  StorageClass
  
  VolumeAttachment
  
  CSIDriver
  
  CSINode
  
  CSIStorageCapacity
  
  Authentication Resources
  
  ServiceAccount
  
  TokenRequest
  
  TokenReview
  
  CertificateSigningRequest
  
  ClusterTrustBundle v1alpha1
  
  SelfSubjectReview
  
  Authorization Resources
  
  LocalSubjectAccessReview
  
  SelfSubjectAccessReview
  
  SelfSubjectRulesReview
  
  SubjectAccessReview
  
  ClusterRole
  
  ClusterRoleBinding
  
  Role
  
  RoleBinding
  
  Policy Resources
  
  LimitRange
  
  ResourceQuota
  
  NetworkPolicy
  
  PodDisruptionBudget
  
  IPAddress v1alpha1
  
  Extend Resources
  
  CustomResourceDefinition
  
  MutatingWebhookConfiguration
  
  ValidatingWebhookConfiguration
  
  ValidatingAdmissionPolicy v1beta1
  
  Cluster Resources
  
  Node
  
  Namespace
  
  Event
  
  APIService
  
  Lease
  
  RuntimeClass
  
  FlowSchema v1beta3
  
  PriorityLevelConfiguration v1beta3
  
  Binding
  
  ComponentStatus
  
  ClusterCIDR v1alpha1
  
  Common Definitions
  
  DeleteOptions
  
  LabelSelector
  
  ListMeta
  
  LocalObjectReference
  
  NodeSelectorRequirement
  
  ObjectFieldSelector
  
  ObjectMeta
  
  ObjectReference
  
  Patch
  
  Quantity
  
  ResourceFieldSelector
  
  Status
  
  TypedLocalObjectReference
  
  Other Resources
  
  ValidatingAdmissionPolicyBindingList v1beta1
  
  Common Parameters
  
  Instrumentation
  
  Service Level Indicator Metrics
  
  CRI Pod & Container Metrics
  
  Node metrics data
  
  Kubernetes Metrics Reference
  
  Kubernetes Issues and Security
  
  Kubernetes Issue Tracker
  
  Kubernetes Security and Disclosure Information
  
  CVE feed
  
  Node Reference Information
  
  Kubelet Checkpoint API
  
  Articles on dockershim Removal and on Using CRI-compatible Runtimes
  
  Node Labels Populated By The Kubelet
  
  Kubelet Configuration Directory Merging
  
  Kubelet Device Manager API Versions
  
  Node Status
  
  Networking Reference
  
  Protocols for Services
  
  Ports and Protocols
  
  Virtual IPs and Service Proxies
  
  Setup tools
  
  Kubeadm
  
  kubeadm init
  
  kubeadm join
  
  kubeadm upgrade
  
  kubeadm config
  
  kubeadm reset
  
  kubeadm token
  
  kubeadm version
  
  kubeadm alpha
  
  kubeadm certs
  
  kubeadm init phase
  
  kubeadm join phase
  
  kubeadm kubeconfig
  
  kubeadm reset phase
  
  kubeadm upgrade phase
  
  Implementation details
  
  Command line tool (kubectl)
  
  Introduction to kubectl
  
  kubectl Quick Reference
  
  kubectl reference
  
  kubectl
  
  kubectl annotate
  
  kubectl api-resources
  
  kubectl api-versions
  
  kubectl apply
  
  kubectl apply edit-last-applied
  
  kubectl apply set-last-applied
  
  kubectl apply view-last-applied
  
  kubectl attach
  
  kubectl auth
  
  kubectl auth can-i
  
  kubectl auth reconcile
  
  kubectl auth whoami
  
  kubectl autoscale
  
  kubectl certificate
  
  kubectl certificate approve
  
  kubectl certificate deny
  
  kubectl cluster-info
  
  kubectl cluster-info dump
  
  kubectl completion
  
  kubectl config
  
  kubectl config current-context
  
  kubectl config delete-cluster
  
  kubectl config delete-context
  
  kubectl config delete-user
  
  kubectl config get-clusters
  
  kubectl config get-contexts
  
  kubectl config get-users
  
  kubectl config rename-context
  
  kubectl config set
  
  kubectl config set-cluster
  
  kubectl config set-context
  
  kubectl config set-credentials
  
  kubectl config unset
  
  kubectl config use-context
  
  kubectl config view
  
  kubectl cordon
  
  kubectl cp
  
  kubectl create
  
  kubectl create clusterrole
  
  kubectl create clusterrolebinding
  
  kubectl create configmap
  
  kubectl create cronjob
  
  kubectl create deployment
  
  kubectl create ingress
  
  kubectl create job
  
  kubectl create namespace
  
  kubectl create poddisruptionbudget
  
  kubectl create priorityclass
  
  kubectl create quota
  
  kubectl create role
  
  kubectl create rolebinding
  
  kubectl create secret
  
  kubectl create secret docker-registry
  
  kubectl create secret generic
  
  kubectl create secret tls
  
  kubectl create service
  
  kubectl create service clusterip
  
  kubectl create service externalname
  
  kubectl create service loadbalancer
  
  kubectl create service nodeport
  
  kubectl create serviceaccount
  
  kubectl create token
  
  kubectl debug
  
  kubectl delete
  
  kubectl describe
  
  kubectl diff
  
  kubectl drain
  
  kubectl edit
  
  kubectl events
  
  kubectl exec
  
  kubectl explain
  
  kubectl expose
  
  kubectl get
  
  kubectl kustomize
  
  kubectl label
  
  kubectl logs
  
  kubectl options
  
  kubectl patch
  
  kubectl plugin
  
  kubectl plugin list
  
  kubectl port-forward
  
  kubectl proxy
  
  kubectl replace
  
  kubectl rollout
  
  kubectl rollout history
  
  kubectl rollout pause
  
  kubectl rollout restart
  
  kubectl rollout resume
  
  kubectl rollout status
  
  kubectl rollout undo
  
  kubectl run
  
  kubectl scale
  
  kubectl set
  
  kubectl set env
  
  kubectl set image
  
  kubectl set resources
  
  kubectl set selector
  
  kubectl set serviceaccount
  
  kubectl set subject
  
  kubectl taint
  
  kubectl top
  
  kubectl top node
  
  kubectl top pod
  
  kubectl uncordon
  
  kubectl version
  
  kubectl wait
  
  kubectl Commands
  
  kubectl
  
  JSONPath Support
  
  kubectl for Docker Users
  
  kubectl Usage Conventions
  
  Component tools
  
  Feature Gates
  
  Feature Gates (removed)
  
  kubelet
  
  kube-apiserver
  
  kube-controller-manager
  
  kube-proxy
  
  kube-scheduler
  
  Debug cluster
  
  Flow control
  
  Configuration APIs
  
  Client Authentication (v1)
  
  Client Authentication (v1beta1)
  
  Event Rate Limit Configuration (v1alpha1)
  
  Image Policy API (v1alpha1)
  
  kube-apiserver Admission (v1)
  
  kube-apiserver Audit Configuration (v1)
  
  kube-apiserver Configuration (v1)
  
  kube-apiserver Configuration (v1alpha1)
  
  kube-apiserver Configuration (v1beta1)
  
  kube-controller-manager Configuration (v1alpha1)
  
  kube-proxy Configuration (v1alpha1)
  
  kube-scheduler Configuration (v1)
  
  kubeadm Configuration (v1beta3)
  
  kubeadm Configuration (v1beta4)
  
  kubeconfig (v1)
  
  Kubelet Configuration (v1)
  
  Kubelet Configuration (v1alpha1)
  
  Kubelet Configuration (v1beta1)
  
  Kubelet CredentialProvider (v1)
  
  WebhookAdmission Configuration (v1)
  
  External APIs
  
  Kubernetes Custom Metrics (v1beta2)
  
  Kubernetes External Metrics (v1beta1)
  
  Kubernetes Metrics (v1beta1)
  
  Scheduling
  
  Scheduler Configuration
  
  Scheduling Policies
  
  Other Tools
  
  Contribute
  
  Contribute to Kubernetes Documentation
  
  Suggesting content improvements
  
  Contributing new content
  
  Opening a pull request
  
  Documenting for a release
  
  Blogs and case studies
  
  Reviewing changes
  
  Reviewing pull requests
  
  For approvers and reviewers
  
  Localizing Kubernetes documentation
  
  Participating in SIG Docs
  
  Roles and responsibilities
  
  Issue Wranglers
  
  PR wranglers
  
  Documentation style overview
  
  Content guide
  
  Style guide
  
  Diagram guide
  
  Writing a new topic
  
  Page content types
  
  Content organization
  
  Custom Hugo Shortcodes
  
  Updating Reference Documentation
  
  Quickstart
  
  Contributing to the Upstream Kubernetes Code
  
  Generating Reference Documentation for the Kubernetes API
  
  Generating Reference Documentation for kubectl Commands
  
  Generating Reference Documentation for Metrics
  
  Generating Reference Pages for Kubernetes Components and Tools
  
  Advanced contributing
  
  Viewing Site Analytics
  
  Docs smoke test page
  
  Kubernetes Documentation
  
  Concepts
  
  Workloads
  
  Workload Management
  
  ReplicationController
  
   You are viewing documentation for Kubernetes version: v1.30
  
   Kubernetes v1.30 documentation is no longer actively maintained. The version you are currently viewing is a static snapshot. For up-to-date information, see the
   latest version.
  
  ReplicationController
  Legacy API for managing workloads that can scale horizontally. Superseded by the Deployment and ReplicaSet APIs.
  
  Note:A Deployment that configures a ReplicaSet is now the recommended way to set up replication.
  A ReplicationController ensures that a specified number of pod replicas are running at any one
  time. In other words, a ReplicationController makes sure that a pod or a homogeneous set of pods is
  always up and available.
  
  How a ReplicationController works
  If there are too many pods, the ReplicationController terminates the extra pods. If there are too few, the
  ReplicationController starts more pods. Unlike manually created pods, the pods maintained by a
  ReplicationController are automatically replaced if they fail, are deleted, or are terminated.
  For example, your pods are re-created on a node after disruptive maintenance such as a kernel upgrade.
  For this reason, you should use a ReplicationController even if your application requires
  only a single pod. A ReplicationController is similar to a process supervisor,
  but instead of supervising individual processes on a single node, the ReplicationController supervises multiple pods
  across multiple nodes.
  ReplicationController is often abbreviated to "rc" in discussion, and as a shortcut in
  kubectl commands.
  A simple case is to create one ReplicationController object to reliably run one instance of
  a Pod indefinitely. A more complex use case is to run several identical replicas of a replicated
  service, such as web servers.
  Running an example ReplicationController
  This example ReplicationController config runs three copies of the nginx web server.
  
  controllers/replication.yaml
  
  apiVersion: v1
  kind: ReplicationController
  metadata:
   name: nginx
  spec:
   replicas: 3
   selector:
   app: nginx
   template:
   metadata:
   name: nginx
   labels:
   app: nginx
   spec:
   containers:
   - name: nginx
   image: nginx
   ports:
   - containerPort: 80
  
  Run the example job by downloading the example file and then running this command:
  kubectl apply -f https://k8s.io/examples/controllers/replication.yaml
  The output is similar to this:
  replicationcontroller/nginx created
  Check on the status of the ReplicationController using this command:
  kubectl describe replicationcontrollers/nginx
  The output is similar to this:
  Name: nginx
  Namespace: default
  Selector: app=nginx
  Labels: app=nginx
  Annotations: <none>
  Replicas: 3 current / 3 desired
  Pods Status: 0 Running / 3 Waiting / 0 Succeeded / 0 Failed
  Pod Template:
   Labels: app=nginx
   Containers:
   nginx:
   Image: nginx
   Port: 80/TCP
   Environment: <none>
   Mounts: <none>
   Volumes: <none>
  Events:
   FirstSeen LastSeen Count
  ```