Introduction
When building a Docker image, you often need to add files from your computer into the image. The COPY instruction lets you do this simply and safely by copying files or folders into the image during build time.
When you want to include your application code inside a Docker image to run it in a container.
When you need to add configuration files or scripts into the image for your app to use.
When you want to copy static assets like images or HTML files into the container.
When you want to add a local folder with multiple files into the image in one step.
When you want to prepare the image with all necessary files before running it.