I moved your post into a separate topic as the other topic was 2 years old discussing a bigger issue and it seems you only have problem with mounting a file. Although you forgot to mention what error message you got and what the result was. Maybe I miss something, but until I understand what your issue, I would not look at source code.
So what happened? Were you able to mount a file? Have you checked it from inside the container (I don’t remember if that container has a shell or not)? Was the folde rmounted as a folder? Did you get an error message? If you got, what was it?