Reputation: 10273
With command line arguments, I can indicate that I want to mount a local directory as a volume:
docker run -i -t -v /path/to/directory/:/mount/point testimage
However, I can't find anything to describe the syntax to VOLUME
in a Dockerfile to do the same thing. Can anyone explain what this looks like?
Upvotes: 3
Views: 3242
Reputation: 13095
Dockerfiles only define the right side (which paths within the container are volumes) -- not the local/left side.
The mapping is done during container creation, not image creation.
Upvotes: 3