I'm trying to read a file from the host to the container which is python script. That script reads a file from the root folder.
For eg /a/b/c/log.txt(This is a dynamic file so I cant add this into Dockerfile)
I need to access this in the docker container. However, from this platform I got a hint that we need to volume.
docker run -v /path/from/host:/path/to/container sntalarmdocker_snt
*sntalarmdocker_snt is the name of image
The main thing is being confused about this path/to/container
- Is it path were DockerFile exist
- Is it /var/snap/docker/common/var-lib-docker/containers/f901e49b67375d4b1105309569c92afae415309ac1787afa2a565a9c08708b18#
This question is related to Python file writing is not working inside docker
May I know how can I resolve this issue. In short I need to read a file from host and write a file into host in which I cant add that in the docker file. Thanks in Advance for time & help