Sambashare as volume behaving strange

On my host machine (ubuntu) i have a samba/cifs-share mounted on /mnt/smbshare

Problem (A)

  1. If I first start the container with -v /mnt/sambashare:/sambashare
  2. Then I mount the sambashare on /mnt/sambashare
  3. /sambashare in the container is EMPTY!

Problem (B)

  1. I mount /mnt/sambashare
  2. I start container
  3. a LS in /sambashare shows all files ok
  4. I unmount /mnt/sambashare
  5. a LS still lists all the files

So, whats up with this? Docker seems to behave very strange when you mount a samba-share into the container? Is this not supported?

The main problem is that the sambashare sometimes disconnects, but since the container still “sees” all the files, it’s hard to “detect”.

Mounting the share in the container is not viable since the container then needs access to the credentials for the share.