You cannot run anything in an image as an image is a read-only template. You are working with containers. I just leave it here so we can use the right terms. Otherwise it could be confusing. It took me some seconds to realize what you werw writing about.
If rsync says the file is missing, I’m pretty sure it does missing from rsync’s point of view. Maybe there is a character in the filename that looks the same but it is different in binary. Or you run the commands in a different folder. You could try renaming the file to something shorter to give less chance for typos and syy if rsync finds that.
If you still need help with this, can you share how you exactly create the container, test the filename before and after running rsync?
By the way, if you really wan to copy files that are in an image, you could also create the container without starting it, and use docker cp
to copy the files to the host (to a Linux filesystem). Than you could run rsync on the host and see if it has anything to do with Docker or just about the filenames.
I guess you could also use docker image export
to export the filesystem which is similar to copying files from a container, except you have the whole image filesystem as a tar file which you can extract. Of course it depends on the image size. I would probably not copy 100 gigabytes to my host to rync 10 kilobytes.