instruction: Create a Dockerfile for fundamentals
output: ```dockerfile
  from Dockerfile0.0 seconds0.0 seconds2Load metadata for docker.io/library/node:20-alpine2.7 seconds0.9 seconds3Load .dockerignore0.0 seconds0.0 seconds4Load build context(Context size: 4.60MB)0.1 seconds0.0 seconds5Set the working directory (WORKDIR)0.1 seconds0.0 seconds6Copy the local code into the container0.0 seconds0.0 seconds7Run yarn install --production10.0 seconds0.0 seconds8Exporting layers2.2 seconds0.0 seconds9Exporting the final image3.0 seconds0.0 secondsGoing back to the docker image history output, you see that each command in the Dockerfile becomes a new layer in the image. You might remember that when you made a change to the image, the yarn dependencies had to be reinstalled. Is there a way to fix this? It doesn't make much sense to reinstall the same dependencies every time you build, right?To fix this, restructure your Dockerfile so that the dependency cache remains valid unless it really needs to be invalidated. For Node-based applications, dependencies are defined in the package.json file. You'll want to reinstall the dependencies if that file changes, but use cached dependencies if the file is unchanged. So, start by copying only that file first, then install the dependencies, and finally copy everything else. Then, you only need to recreate the yarn dependencies if there was a change to the package.json file.Update the Dockerfile to copy in the package.json file first, install dependencies, and then copy everything else in.
  ```