A very simple python program, suppose current directory is /PYTHON, I want to pass file.txt as argument to python script boot.py, here is my Dockerfile
FRO
It won't work that way. Like you said, file1.txt is not in the container.
The work around is to use Docker volumes to inject files from your host machine to the container when running it.
Something like this :
docker run -v /local/path/to/file1.txt:/container/path/to/file1.txt -t boot:latest python boot.py file1.txt
Then /local/path/to/file1.txt would be the path on your host machine which will override /container/path/to/file1.txt on the container.