Sometimes you need to create a docker container that has additional files included. One way to do this is to have the files available in the docker contex (typicallly the file you are running the docker command in) and using the COPY command.
This however requires multiple files and management of the context when building the image. This can be a problematic requirement.
For small text files, such as configuration documents or small shell scripts used for setup or execution, another possible soluton is a the use of a "Here Document" in conjunction