instruction: Create a Dockerfile for Nginx with production best practices
output: ```dockerfile
  from the target field.# Create a deployment.yaml file
  cat <<EOF > deployment.yaml
  apiVersion: apps/v1
  kind: Deployment
  metadata:
   name: my-nginx
  spec:
   selector:
   matchLabels:
   run: my-nginx
   replicas: 2
   template:
   metadata:
   labels:
   run: my-nginx
   spec:
   containers:
   - name: my-nginx
   image: nginx
   ports:
   - containerPort: 80
  EOF
  
  # Create a json patch
  cat <<EOF > patch.yaml
  - op: replace
   path: /spec/replicas
   value: 3
  EOF
  
  # Create a kustomization.yaml
  cat <<EOF >./kustomization.yaml
  resources:
  - deployment.yaml
  
  patches:
  - target:
   group: apps
   version: v1
   kind: Deployment
   name: my-nginx
   path: patch.yaml
  EOF
  Run kubectl kustomize ./ to see the replicas field is updated:apiVersion: apps/v1
  kind: Deployment
  metadata:
   name: my-nginx
  spec:
   replicas: 3
   selector:
   matchLabels:
   run: my-nginx
   template:
   metadata:
   labels:
   run: my-nginx
   spec:
   containers:
   - image: nginx
   name: my-nginx
   ports:
   - containerPort: 80
  In addition to patches, Kustomize also offers customizing container images or injecting field values
  ```