instruction: Create a Dockerfile for multi-stage build with production best practices
output: ```dockerfile
  from stdin, you can use - as the argument for --file.
  
  $ cat Dockerfile | docker buildx build -f - .
  Load the single-platform build result to docker images (--load)Shorthand for --output=type=docker. Will automatically load the
  single-platform build result to docker images.Write build result metadata to a file (--metadata-file)To output build metadata such as the image digest, pass the --metadata-file flag.
  The metadata will be written as a JSON object to the specified file. The
  directory of the specified file must already exist and be writable.
  
  $ docker buildx build --load --metadata-file metadata.json .
  $ cat metadata.json
  
  {
   "buildx.build.provenance": {},
   "buildx.build.ref": "mybuilder/mybuilder0/0fjb6ubs52xx3vygf6fgdl611",
   "buildx.build.warnings": {},
   "containerimage.config.digest": "sha256:2937f66a9722f7f4a2df583de2f8cb97fc9196059a410e7f00072fc918930e66",
   "containerimage.descriptor": {
   "annotations": {
   "config.digest": "sha256:2937f66a9722f7f4a2df583de2f8cb97fc9196059a410e7f00072fc918930e66",
   "org.opencontainers.image.created": "2022-02-08T21:28:03Z"
   },
   "digest": "sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3",
   "mediaType": "application/vnd.oci.image.manifest.v1+json",
   "size": 506
   },
   "containerimage.digest": "sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3"
  }
  NoteBuild record
  provenance
  (buildx.build.provenance) includes minimal provenance by default. Set the
  BUILDX_METADATA_PROVENANCE environment variable to customize this behavior:min sets minimal provenance (default).max sets full provenance.disabled, false or 0 doesn't set any provenance.
  NoteBuild warnings (buildx.build.warnings) are not included by default. Set the
  BUILDX_METADATA_WARNINGS environment variable to 1 or true to
  include them.Set the networking mode for the RUN instructions during build (--network)Available options for the networking mode are:default (default): Run in the default network.none: Run with no network access.host: Run in the hostâs network environment.Find more details in the
  Dockerfile reference.Ignore build cache for specific stages (--no-cache-filter)The --no-cache-filter lets you specify one or more stages of a multi-stage
  Dockerfile for which build cache should be ignored. To specify multiple stages,
  use a comma-separated syntax:
  
  $ docker buildx build --no-cache-filter stage1,stage2,stage3 .
  For example, the following Dockerfile contains four stages:baseinstalltestrelease
  
  # syntax=docker/dockerfile:1
  ```