instruction: Create a Dockerfile for Nginx with production best practices
output: ```dockerfile
  from the configuration file in the live configuration.
  
  kubectl diff -f <directory>
  kubectl apply -f <directory>
  
  Note: Add the -R flag to recursively process directories.
  
  Here's an example configuration file:
  
  application/simple_deployment.yaml
  
  apiVersion: apps/v1
  kind: Deployment
  metadata:
   name: nginx-deployment
  spec:
   selector:
   matchLabels:
   app: nginx
   minReadySeconds: 5
   template:
   metadata:
   labels:
   app: nginx
   spec:
   containers:
   - name: nginx
   image: nginx:1.14.2
   ports:
   - containerPort: 80
  
  Create the object using kubectl apply:
  kubectl apply -f https://k8s.io/examples/application/simple_deployment.yaml
  
  Note: For purposes of illustration, the preceding command refers to a single
  configuration file instead of a directory.
  
  Print the live configuration using kubectl get:
  kubectl get -f https://k8s.io/examples/application/simple_deployment.yaml -o yaml
  The output shows that the kubectl.kubernetes.io/last-applied-configuration annotation
  was written to the live configuration, and it matches the configuration file:
  kind: Deployment
  metadata:
   annotations:
   # ...
   # This is the json representation of simple_deployment.yaml
   # It was written by kubectl apply when the object was created
   kubectl.kubernetes.io/last-applied-configuration: |
   {"apiVersion":"apps/v1","kind":"Deployment",
   "metadata":{"annotations":{},"name":"nginx-deployment","namespace":"default"},
   "spec":{"minReadySeconds":5,"selector":{"matchLabels":{"app":nginx}},"template":{"metadata":{"labels":{"app":"nginx"}},
   "spec":{"containers":[{"image":"nginx:1.14.2","name":"nginx",
   "ports":[{"containerPort":80}]}]}}}}
   # ...
  spec:
   # ...
   minReadySeconds: 5
   selector:
   matchLabels:
   # ...
   app: nginx
   template:
   metadata:
   # ...
   labels:
   app: nginx
   spec:
   containers:
   - image: nginx:1.14.2
   # ...
   name: nginx
   ports:
   - containerPort: 80
   # ...
   # ...
   # ...
   # ...
  Directly update the replicas field in the live configuration by using kubectl scale.
  This does not use kubectl apply:
  kubectl scale deployment/nginx-deployment --replicas=2
  Print the live configuration using kubectl get:
  kubectl get deployment nginx-deployment -o yaml
  The output shows that the replicas field has been set to 2, and the last-applied-configuration
  annotation does not contain a replicas field:
  apiVersion: apps/v1
  kind: Deployment
  metadata:
   annotations:
   # ...
   # note that the annotation does not contain replicas
   # because it was not updated through apply
   kubectl.kubernetes.io/last-applied-configuration: |
   {"apiVersion":"apps/v1","kind":"Deployment",
   "metadata":{"annotations":{},"name":"nginx-deployment","namespace":"default"},
   "spec":{"minReadySeconds":5,"selector":{"matchLabels":{"app":nginx}},"template":{"metadata":{"labels":{"app":"nginx"}},
   "spec":{"containers":[{"image":"nginx:1.14.2","name":"nginx",
   "ports":[{"containerPort":80}]}]}}}}
   # ...
  spec:
   replicas: 2 # written by scale
   # ...
   minReadySeconds: 5
   selector:
   matchLabels:
   # ...
   app: nginx
   template:
   metadata:
   # ...
   labels:
   app: nginx
   spec:
   containers:
   - image: nginx:1.14.2
   # ...
   name: nginx
   ports:
   - containerPort: 80
   # ...
  Update the simple_deployment.yaml configuration file to change the image
  ```