Docker Community Forums

Share and learn in the Docker community.

How can I access Windows shared drive?

I’m trying to access a shared drive D: from my Windows host in my Windows container.
I’m using Docker Desktop 2.1.0.5 and Windows 10 Pro 1903.

How should I proceed?

I’v tried to use the --volume flag at runtime with no luck.

docker run --rm -it -v D::D: --name myimage mydocker/image

docker: Error response from daemon: invalid volume specification: 'D::D:'
docker run --rm -it -v D::C:\D --name myimage mydocker/image

docker: Error response from daemon: invalid volume specification: 'D::C:\D'
docker run --rm -it -v \\server-ip\data:C:\D --name myimage mydocker/image

docker: Error response from daemon: invalid volume specification: '\\server-ip\data:C:\D'

From my container, I can ping my server ip.

Is it a syntax error or something I should do in my Dockerfile?
I didn’t find any documentation on shared drives inside Docker Windows container.