Here is the solution and the best practice:
You need to create a resources folder where you can keep all your files you want to copy.
+-- Dockerfile
+-- resources
¦ +-- file1.txt
¦ +-- file2.js
The command for copying files should be specified this way:
COPY resources /root/folder/
where
*resources - your local folder which you created in the same folder where Dockerfile is
*/root/folder/ - folder at your container