How to map LAN network share to Docker volume?

Hi 4y later!

I think this solves my problem (trying to get a drive shared by Samba in a Pi available to a docker instance in Windows) but I can’t get docker to mount it and I can’t find proper documentation about it. (I’m super new to this so very likely I just don’t understand what’s relevant)

Is the username/password mandatory? My share does not have one nor have I created a user for it.
How does one access the share in the compose file?

I have this:

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - D:\Me:/mnt/media/Me:ro
      - cifs:/Me/Fotos:/mnt/media/Me

and then on volumes, at the bottom:

volumes:
  pgdata:
  model-cache:
  cifs:
    driver: local
    driver_opts:
      type: cifs
      o: uid=plex,gid=plex,vers=3.0
      device: //192.168.1.82/Me/Fotos

Appreciate any feedback, feel like I’m close but doing something stupid.