Docker Access External Files
I am wondering that docker has access to external files, however I do not want to include them as a volume. The files I need to access change over time, which means that I will need to re-mount it again.
If I am unable to install a simple directory and everything in that directory will also be installed.
I just need to allow a program placed in a container to run "on top" of my local system, where that program can access files on my local system.
Tips? Is there any other way besides adding files to be treated as a volume?
source to share
It looks like setting the host directory in the container is what you are looking for. You don't have to reload the container to get changes to the mounted directory. Link to relevant documents .
source to share
I wonder if the ADD team can help you achieve your goal. For example, given the line Dockerfile:
ADD /Users/userX/myappfiles /appfiles
and command line:
docker run myapp --input /myappfiles
myapp
will be able to access the /Users/userX/myappfiles
local file system to retrieve its entries.
source to share