How to write data to host file system from Docker container -


i have docker container running code , creating html reports. want these reports published specific directory on host machine, i.e. @ /usr/share/nginx/reports

the way have gone doing mount host directory data volume, i.e. docker run -v /usr/share/nginx/reports --name my-container com.containers/my-container

however, when ssh host machine, , check contents of directory /usr/share/nginx/reports, don't see of report data there.

am doing wrong?

the host machine ubuntu server, , docker container ubuntu, no boot2docker weirdness going on here.

from "managing data in containers", mounting host folder container be:

docker run -v /users/<path>:/<container path> 

(see "mount host directory data volume")

using -v /usr/share/nginx/reports declare internal dontainer path /usr/share/nginx/reports volume, have nothing host folder.


Comments