Docker Community Forums

Share and learn in the Docker community.

Having a docker container process a Local directory (not a volume)


(Anthony R. Colombo) #1

Hello. so I am running a docker image on a virtual machine, and the virtual machine runs the docker image automatically.

if I need to have the docker image process local files, I need to mount the local files as a volume correct?

when I don’t run the files as a volume, then the image is run and the error returned is “file directory not found”. this error makes sense because the container does not have the path relative to its container.

So when I run the docker image should it be "sudo docker run -v directory_of_choice " ?