What worked for me was adding a dot in front of the first slash, so instead of:
docker cp ex.txt my_container:/my_folder/
it should be
docker cp ex.txt my_container:./my_folder/