Docker data volumes cannot mount files, only directories, right?

  docker, question

I mounted an empty file at run time and tried it. the mount was successful, but the file was modified. looking inside the container, there was no file content.
Can only mount directories, not files?

Files can be mounted
However, the file inode cannot be changed (after the change, the inside and outside of the container are no longer the same file)
How did you modify the document