Docker Desktop on Windows can bind only one Volume per drive, correct?

Docker Desktop on Windows can bind only one Volume per drive, correct?

I have the following volume definitions in docker-compose.yml

volumes:
- “K:\Media:/ElementsMedia”
- "Z:\Media:/Elements_2Media
- “Z:\VOMedia:/ OriginalsMedia”

Oddly enough, on the Inspect tab, I can see the third volume configuration for “Z:\VOMedia:/ OriginalsMedia”, but the /OriginalMedia folder is not showing up in the running container. If I comment out the line above, the /OriginalsMedia shows up in the container. It looks like Docker Desktop on Windows allows only for one volume per Windows drive and not two or more. Is this correct? Can anyone explain?

Thanks,
T.

There is no restriction. You can map as many paths from a Windows drive to container paths as you need.

Looks like there is a space character in the container path.

Hi Meyay, I didn’t think there would a restriction, but somehow it won’t allow me to map a drive twice. I may add that the Z: dive is a USB external HDD.

(The space is only in this post above, not in the YML file. Must have snuck in there editing the post).

Thanks for looking at this.

Oh, I think I juts figured it out. It actually does make the bind, however, it wont show with the “df” command. “df” only shows the drive mapping once. “ls” actually shows the path /OriginalsMedia and when I add a file there, it actually shows up in Z:\VOMedia. So, consider this solved. Thanks.

Yup, df isn’t the right tool to test this scenario. Writing data into the bind and checking the host path indeed is.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.