How can I access dockerfile location within a shell script from outside the docker?

-I am writing a shell script to check if file exists and is non zero or not. The script is basic though but the challenge here is I want to check the files contained inside a docker. How can I access a docker file location within a script running from outside the docker.
-I am using an array which takes file locations as values for eg :

array=(/u01/FDT/FDT_Inbox/MAINFRAME_FILES/DC_NETWORK_CONFIG/sample.txt /u01/FDT/FDT_Inbox/MAINFRAME_FILES/DC_NETWORK_CONFIG/abc.txt)

and a for loop for every index i of the array to check if the file exists.

Source: StackOverflow