5

I have a Docker Volume used by several containers (Linux containers running on Windows). I would like to be able to access the Volume from the Windows machine through Windows Explorer, in the best case with a network drive, e.g.:

services:
  smbd:
    image: dperson/samba
    ports:
      - "445:445/tcp"
    volumes:
      - data:/public

...
volumes:
  data:
    external:
      name: mydrive

In Windows, I can connect the drive Z: to \\docker.ip.address\public and am able to see its content, e.g. if the volume mydrive above contained the subfolder mystuff, I'd see the following on Windows:

- Z:\mystuff

The problem is, 445 is already in use on localhost (for SMB, of course) and one can't use a different port, as SMB is unforgiving. There's no problem if you use a VM, as the VM will have an adapter and IP of its own, so 445 is free again.

One possibility may be to connect Docker through a different adapter (and not try to use localhost:445), but I don't know how to do that with Windows.

The reason SMB is needed (rather than accessing the managed volume directly through explorer) is so that volumes can be easily switched out in Docker. An alternative that still works with the Docker volume would also be alright in my case.

Druckles
  • 3,161
  • 2
  • 41
  • 65

0 Answers0