Docker Community Forums

Share and learn in the Docker community.

Problems sharing folder on Windows 10 with Docker container


#1

I spend most of my time using Linux. A command like the following will make the user’s home directory available in the “shared” folder of the container and send graphical output to localhost:8000

docker run -ti -p 127.0.0.1:8000:8000 -v %cmd%/home/fenics/shared -w /home/fenics/shared quay.io/fenicsproject/stable:current

On Win 10 Professional, the graphical output appears, but the shared folder in the container does not access anything on the host.

Perhaps it’s interesting to note that
docker run -rm -v c:/Users:/shared quay.io/fenicsproject/stable ls /shared returns the contents of the container’s top level directory:

WELCOME
demo
fenics.env.conf
local
shared

This is not otherwise helpful, in the sense that I can’t find this content anywhere on the host. I am likely to be using Windows from time to time, so I would appreciate some advice about what I’m apparently doing wrong. Permissions do not seem to be a problem.