Yml file: Volumes on Windows share

My linux-based container is on a Windows Server 2022. In my yml file, I need to have a volume under “volumes”, which refers to a shared folder on a Windows Server in the LAN.

I tried this notation, but it does not seem to fit:

- “//Servername/folder:/folder/subfolder”

Many thanks for a hint.

How did you install Docker on Windows server? Did you install WSL2 and Docker CE in a WSL distribution?

Can you first give us a hint what that volume definition resulted? Did you have an error message?

I’m not familiar with volume references on Windows, but if you installed Docker CE in the WSL distro, you need to use Linux paths. In general, you can use either volume plugins or mount a network filesystem on the host and mount that. I never had to do that so to be honest I’m not sure about the proper way, because I know it doesn’t always work.

Regarding shared codes:

Please, format your post according to the following guide: How to format your forum posts
In short: please, use </> button to share codes, terminal outputs, error messages or anything that can contain special characters which would be interpreted by the MarkDown filter. Use the preview feature to make sure your text is formatted as you would expect it and check your post after you have sent it so you can still fix it.