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 :


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

Source: StackOverflow