python - Save a file generated by app running on docker to a given path in the host machine -


i have python app running on docker container , generates pdf file. want store generated pdf file in given path in host machine.

i not sure on how can achieved. ideas?

mount volume in container mapped desired path in host

docker run -d -v /host/path:/python_app/output your_docker_image 

where /python_app/output path inside container app writing pdf file.

note /host/path should have enough permissions

chmod 777 /host/path 

Comments