I want to capture the content of file which is located in the host os (linus) into a variable from the Docker container using a python script
Can I do this
FILE="/home/test/file.txt"
#open the file for read-only
fd = os.open(FILE,os.O_RDONLY)
content = os.read(fd,12)
print content
ended up with this error
OSError: [Errno 2] No such file or directory: '/home/test/file.txt'
Please suggest a way if I am doing it wrong